css rotation属性怎么用

青灯夜游
青灯夜游 原创
2019-05-29 16:01:04 2938浏览

rotation属性是css3的一个新增属性,用于围绕由rotation-point属性定义的指定点,对块级元素进行逆时针旋转。边框、内边距、内容以及背景(非固定)也会被旋转!但目前主流浏览器都还不支持该属性。

css rotation属性怎么用?

rotation属性围绕由rotation-point属性定义的指定点,对块级元素进行逆时针旋转。

语法:

rotation: angle;

属性值:

● angle:元素旋转角度。可能的值:0deg 到 360deg。

注释:边框、内边距、内容以及背景(非固定)也会被旋转!目前主流浏览器都还不支持 rotation 属性。

css rotation属性 示例

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<style> 
h1
{
rotation-point:50% 50%;
rotation:180deg;
}
</style>
</head>
<body>
<h1>旋转效果</h1>
<p><b>注释:</b>目前没有浏览器支持 rotation-point 或 rotation 属性。</p>
</body>
</html>

以上就是css rotation属性怎么用的详细内容,更多请关注php中文网其它相关文章!

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。