直接将其放入页面中的<style></style>即可,或者外部样式直接在内部引用。
html,body {-webkit-filter: grayscale(100%)
-moz-filter: grayscale(100%)
-ms-filter: grayscale(100%)
-o-filter: grayscale(100%)
filter: grayscale(100%)
filter: gray
}
在网页的<head></head>之间加入以下代码,调整网页的灰度等级…body{FILTER: progid:DXImageTransform.Microsoft.BasicImage(grayScale :1)}
img{FILTER: progid:DXImageTransform.Microsoft.BasicImage(grayScale :1)}
div {filter: progid:dximagetransform.microsoft.basicimage(grayscale :1)}
object {filter: progid:dximagetransform.microsoft.basicimage(grayscale :1)}
select {filter: progid:dximagetransform.microsoft.basicimage(grayscale :1)}
embed {filter: progid:dximagetransform.microsoft.basicimage(grayscale :1)}
或者加入以下代码到网站 css里
html { filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)}