首页
CSS
CSS 样式图片
试试:图像上的不同滤镜
运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <head> <style> body { background-color:white; } img { width: 33%; height: auto; float: left; max-width: 235px; } .blur {filter: blur(4px);} .brightness {filter: brightness(250%);} .contrast {filter: contrast(180%);} .grayscale {filter: grayscale(100%);} .huerotate {filter: hue-rotate(180deg);} .invert {filter: invert(100%);} .opacity {filter: opacity(50%);} .saturate {filter: saturate(7);} .sepia {filter: sepia(100%);} .shadow {filter: drop-shadow(8px 8px 10px green);} </style> </head> <body> <h2>Image Filters</h2> <p><strong>Note:</strong> The filter property is not supported in Internet Explorer or Edge 12.</p> <img src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="blur" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="brightness" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="contrast" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="grayscale" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="huerotate" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="invert" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="opacity" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="saturate" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="sepia" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> <img class="shadow" src="pineapple.jpg" alt="Pineapple" width="300" height="300"> </body> </html>