码迷,mamicode.com
首页 > 其他好文 > 详细

北京不下雪,自己来点雪花看看吧~(附效果图)

时间:2017-12-22 03:56:37      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:htm   color   line   nim   object   otto   events   oct   active   

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
    </body>
</html>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
            body{
                background: black;
            }
            @keyframes snow{
                0% {
                    background-position: 0 0, 0 0;
                }
                100% {
                    background-position: 500px 1000px, 500px 500px;
                }
            }
            @-webkit-keyframes snow{
                0% {
                    background-position: 0 0, 0 0;
                }
                100% {
                    background-position: 500px 1000px, 500px 500px;
                }
            }
            #snowMask {
                position: fixed;
                left: 0;
                top: 0;
                right: 0;
                bottom: 0;
                z-index: 999;
                background: url(‘http://2013.miaov.com/2013/img/snow1.png‘),url(‘http://2013.miaov.com/2013/img/snow2.png‘);
                pointer-events: none;
                -webkit-animation: snow 15s linear infinite;
                animation: snow 15s linear infinite;
            }
        </style>
        <script type="text/javascript">
            (function(){
                var snowMask = document.querySelector(‘#snowMask‘);
                function isIE() {
                    if (!!window.ActiveXObject || "ActiveXObject" in window)
                        return true;
                    else
                        return false;
                }
                snowMask.style.display = (!isIE())?"block":"none";
            })();
        </script>
    </head>
    <body>
        <div id="snowMask" style="display: block;"></div>
    </body>
</html>

技术分享图片

北京不下雪,自己来点雪花看看吧~(附效果图)

标签:htm   color   line   nim   object   otto   events   oct   active   

原文地址:http://www.cnblogs.com/-Steven/p/8083303.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!