TUTORIALFrontendFETCHED

CSS3 rotation 属性

CSS3 rotation 属性 实例 将 h1 元素旋转 180 度(从上向下):<p> [mycode3 type='css'] h1 { rotation-point:50% 50%; rotation:180deg; } [/mycode3] 尝试一下 » 浏览器支持 目前没有浏览器支持 rotation 属性。 属性定义及使用说明 rot..

Updated 7/16/2026

Tutorial detail pages default to noindex.

CSS3 rotation 属性


实例

将 h1 元素旋转 180 度(从上向下):<p>

h1 { rotation-point:50% 50%; rotation:180deg; }

尝试一下 »

浏览器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

目前没有浏览器支持 rotation 属性。


属性定义及使用说明

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

默认值: 0
继承: no
版本: CSS3
JavaScript 语法: object.style.rotation="180deg"


语法

rotation: angle;

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