html rotate()函数,CSS rotate()用法及代码示例
rotate()函數(shù)是一個(gè)內(nèi)置函數(shù),用于基于給定角度作為參數(shù)旋轉(zhuǎn)元素。可以按照度數(shù),刻度,弧度或轉(zhuǎn)角設(shè)置角度。
用法:
rotate( angle )
參數(shù):該功能接受代表旋轉(zhuǎn)角度的單個(gè)參數(shù)角度。正角和負(fù)角分別使元素順時(shí)針和逆時(shí)針旋轉(zhuǎn)。
以下示例說(shuō)明了CSS中的rotate()函數(shù):
范例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瀏覽器
火狐瀏覽器
蘋(píng)果瀏覽器
Opera
總結(jié)
以上是生活随笔為你收集整理的html rotate()函数,CSS rotate()用法及代码示例的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 计算机音乐除了春天爱情和樱花,High4
- 下一篇: 计算机试题新编实训,计算机基础与实训 练