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中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号