CSS3 rotation-point的屬性是一對值,定義從上左框線邊緣進行偏移的點。
定義和用法,語法,實例,
定義和用法
rotation-point 屬性是一對值,定義從上左框線邊緣進行偏移的點。
提示:rotation-point 屬性需要與 rotation 屬性結合使用。
| 默認值: | 50% 50% |
|---|---|
| 繼承性: | no |
| 版本: | CSS3 |
| JavaScript 語法: | object.style.rotationPoint="25% 25%" |
語法
rotation-point:value;
| 值 | 描述 |
|---|---|
left top left center left bottom right top right center | 如果只規定一個關鍵字,則第二個值將是 "center"。 |
x% y% | 百分比值,參考框線盒寬度和高度。 |
實例
將 h1 元素旋轉 180 度(從上向下):
h1 {rotation-point:50% 50%;rotation:180deg; }
