使用 CSS 设置反色效果
反色效果用于将对象的 color 中的值映射到色谱中的相反值,也就是说,创建负片图像。
该滤镜中使用以下参数:
序列号 | 参数和描述 |
---|---|
1 | 反色 将对象的 color 映射到 color 中的相反值。 |
示例
你可以尝试运行以下代码来实现反色效果:
<html> <head> </head> <body> <img src = "/images/css.gif" alt = "CSS Logo" style = "Filter: invert" /> <p>Text Example:</p> <div style = "width: 357; height: 50; font-size: 30pt; font-family: Arial Black; color: red; Filter: invert"> CSS Tutorials </div> </body> </html>
广告