CSS3 Filter的十种特效

前端开发接口文档实例
前端 开发文档
site(pan.baidu.com) web前端开发规范文档
前端开发规范文档 阿里
写前端开发需求文档

http://www.w3cplus.com/css3/ten-effects-with-css3-filter

html 代码

<!DOCTYPE html>
<html lang=”en-US”>
    <head>
        <meta charset=”UTF-8″ />
        <title>CSS Filter Effects In Action</title>
        <style type=”text/css”>
            * {
                margin: 0;
                padding: 0;
            }
            ul {
                width: 690px;
                margin: 20px auto;
                letter-spacing: -4px;
                word-spacing: -4px;
                font-size: 0;
            }
            li {
                font-size: 16px;
                letter-spacing: normal;
                word-spacing: normal;
                display: inline-block;
                *display: inline;
                zoom: 1;
                list-style: none outside none;
                margin: 5px;
            }
            img {
                width: 128px;
                height: 128px;
            }
            .gallery li:nth-child(2) {
                -webkit-filter: grayscale(1);
            }
            .gallery li:nth-child(3) {
                -webkit-filter: sepia(1);
            }
            .gallery li:nth-child(4) {
                -webkit-filter: saturate(0.5);
            }
            .gallery li:nth-child(5) {
                -webkit-filter: hue-rotate(90deg);
            }
            .gallery li:nth-child(6) {
                -webkit-filter: invert(1);
            }
            .gallery li:nth-child(7) {
                -webkit-filter: opacity(0.2);
            }
            .gallery li:nth-child(8) {
                -webkit-filter: blur(3px);
            }
            .gallery li:nth-child(9) {
                -webkit-filter: drop-shadow(5px 5px 5px #ccc);
            }
            .gallery li:nth-child(10) {
                -webkit-filter: saturate(6) hue-rotate(361deg) brightness(0.09);
            }
            .gallery:hover li:not(:hover) {
                -webkit-filter: blur(2px) grayscale(1);
                opacity: 0.7;
            }
        </style>
    </head>
    <body>
        <ul class=”gallery”>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
            <li>
                <img
                    alt=””
                    src=”http://www.w3cplus.com/sites/default/files/filter.jpg”
                />
            </li>
        </ul>
        ​
    </body>
</html>
web前端编写开发文档
web前端开发实验文档
前端开发流程文档
前端开发接口文档模式
web前端开发服装城文档
» 本文来自:前端开发者 » 《CSS3 Filter的十种特效》
» 本文链接地址:https://www.rokub.com/6742.html
» 您也可以订阅本站:https://www.rokub.com
赞(0)
分享到: 更多 (0)

评论 抢沙发