8.右下角的弹出广告

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script src="jquery-3.3.1.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        #ad{
            position: absolute;
            right: 0;
            bottom: 0;
        }
        #close{
            position: absolute;
            top: 2px;
            right: 10px;
            cursor: pointer;
        }
    </style>
    <script>
        $(function () {
            $("#ad").slideDown("slow")
                    .slideUp("normal")
                    .fadeIn(1000)
                    .children("#close").click(function () {
                        $(this).parent().fadeOut();
                    })
        })
    </script>
</head>
<body>
<div id="ad">
    <img src="ad.jpg" alt=""/>
    <img src="h.jpg" alt="" id="close"/>
</div>
</body>
</html>

posted on 2018-10-02 22:51  xxcxxc  阅读(152)  评论(0编辑  收藏  举报