首页 > 其他 > 详细

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

时间:2017-12-22 03:00:04      阅读:281      评论:0      收藏:0      [点我收藏+]
<!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>

技术分享图片

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!