金鼎娱乐
4008-888-888 在线客服 联系我们 返回顶部
企业动态 技术分享 行业动态

CSS怎么使网页全部变成灰色

2016-10-13

Desaturating a color image couldn’t be simpler with CSS3. We’ll apply the filter as a class, as you’d typically desire several images to be affected by the code at the same time:

img.desaturate { filter: grayscale(100%); }

Naturally, all current browsers implement CSS3 filters via vendor prefixes, so our first job is to insert that code, writing in CSS that does not yet exist in order to future-proof our work:

img.desaturate { filter: grayscale(100%);
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
filter: grayscale(100%);
}

Applying the class to the image is easy:

在线咨询
Copyright © 2002-2028 金鼎娱乐 版权所有 苏ICP12345678  技术支持:网站模版

    1. <tfoot id="fcVkEI34u"><center id="fcVkEI34u"></center></tfoot><pre id="fcVkEI34u"> <ul id="fcVkEI34u"><style id="fcVkEI34u"></style><blockquote id="fcVkEI34u"></blockquote></ul></pre><ins id="fcVkEI34u"><ul id="fcVkEI34u"></ul></ins>

        •  

            <b id="fcVkEI34u"><noscript id="fcVkEI34u"></noscript></b>
                 
                 

                1. <tfoot id="EuhtIu2tr"><center id="wrNhCQurU"></center></tfoot><pre id="O1xLRfv9n"> <ul id="gQlLw94Le"><style id="mUxLzvA5a"></style><blockquote id="csEhIjMZA"></blockquote></ul></pre><ins id="dDDXcPEbR"><ul id="NbgQBRVFM"></ul></ins>

                    •  

                        <b id="QzZ1aka8X"><noscript id="jdA7Ijkma"></noscript></b>
                             
                             

                            1. <tfoot id="4AJEByDLa"><center id="akVwDrxUP"></center></tfoot><pre id="17bNnljkK"> <ul id="2XB5hTwSQ"><style id="OEvuYXeJr"></style><blockquote id="HzcT1Utnj"></blockquote></ul></pre><ins id="NTKIDIktK"><ul id="1P4ch2iWM"></ul></ins>

                                •  

                                    <b id="igsOZ3zSG"><noscript id="zSVG06R2S"></noscript></b>
                                         
                                         

                                        1. <tfoot id="v5qeTQ8rX"><center id="AJedoscMW"></center></tfoot><pre id="mbW0Y56Te"> <ul id="nCTdqvRrk"><style id="BD1awWbr6"></style><blockquote id="11INwnx4A"></blockquote></ul></pre><ins id="PlLq3RRxR"><ul id="xF8jX1zQy"></ul></ins>

                                            •  

                                                <b id="mFROZhOBT"><noscript id="MISfG4vYD"></noscript></b>