Home  >  Article  >  Web Front-end  >  Simple website turns gray and white

Simple website turns gray and white

WBOY
WBOYOriginal
2016-09-22 08:42:162142browse

Add css style

html{
filter: grayscale(100%);
-webkit-filter: grayscale(100%); /* Chrome 19+ & Safari 6+ */
-moz-filter: grayscale(100%);
-ms -filter: grayscale(100%);
-o-filter: grayscale(100%);
filter: url("data:image/svg+xml;utf8,#grayscale"); /* Firefox */
filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
filter: gray; /* IE6-9 */
}

Add the following code to the html tag

<span style="color: #0000ff;"><</span><span style="color: #800000;">html </span><span style="color: #ff0000;">style</span><span style="color: #0000ff;">="filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);-webkit-filter: grayscale(100%);"</span><span style="color: #0000ff;">></span>

ie 10 If you must turn gray, you can try using grayscale.js

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn