html rotate()函数,CSS rotate()用法及代码示例
生活随笔
收集整理的這篇文章主要介紹了
html rotate()函数,CSS rotate()用法及代码示例
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
rotate()函數是一個內置函數,用于基于給定角度作為參數旋轉元素。可以按照度數,刻度,弧度或轉角設置角度。
用法:
rotate( angle )
參數:該功能接受代表旋轉角度的單個參數角度。正角和負角分別使元素順時針和逆時針旋轉。
以下示例說明了CSS中的rotate()函數:
范例1:
CSS rotate() functionbody {
text-align:center;
}
h1 {
color:green;
}
.rotate_image {
transform:rotate(45deg);
}
GeeksforGeeks
CSS rotate() function
????
"https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png"
alt="GeeksforGeeks logo">
輸出:
范例2:
CSS rotate() functionbody {
text-align:center;
}
h1 {
color:green;
}
.GFG {
font-size:35px;
font-weight:bold;
color:green;
transform:rotate(30deg);
}
GeeksforGeeks
CSS rotate() function
Welcome to GeeksforGeeks輸出:
支持的瀏覽器:rotate()功能支持的瀏覽器如下:
谷歌瀏覽器
IE瀏覽器
火狐瀏覽器
蘋果瀏覽器
Opera
總結
以上是生活随笔為你收集整理的html rotate()函数,CSS rotate()用法及代码示例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机音乐除了春天爱情和樱花,High4
- 下一篇: 计算机试题新编实训,计算机基础与实训 练