hue-rotate()函数是一个内置函数,用于对图像应用滤镜以设置图像的色调旋转。
用法:
hue-rotate( angle )
参数:该功能接受单参数角度,该角度保持hue-rotation的角度。正色相角会增加色相值,而负角会降低色相值。
以下示例说明了CSS中的hue-rotate()函数:
例:
CSS hue-rotate() Functionh1 {
color:green;
}
body {
text-align:center;
}
.hue_rotate_effect {
filter:hue-rotate(100deg);
}
GeeksforGeeks
CSS hue-rotate() function
"https://media.geeksforgeeks.org/wp-content/cdn-uploads/20190710102234/download3.png"
alt="GeeksforGeeks logo">
输出:
支持的浏览器:hue-rotate()函数支持的浏览器如下:
谷歌浏览器
IE浏览器
火狐浏览器
苹果浏览器
Opera