css給網頁添加 黑白濾鏡

來源:互聯網
上載者:User

<style type="text/css">
    /*給網頁添加 黑白濾鏡*/
    html{
        /*相容FF*/
        filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale");
        /*相容IE核心*/
        filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
        /*相容其它,Google之類的*/
        -webkit-filter: grayscale(1);
    }
</style>

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.