web前端–弹窗广告实现

很多网站都有许多很烦人的弹窗广告,下面带来的就是一个烦人的弹窗广告效果。
效果图:
web前端--弹窗广告实现

注意右下角,那就是我们的弹窗小广告,有点隐蔽。
下面就是代码实现:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="//libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <script src="./jquery-1.12.4.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;

        }
        .ad{
            position: fixed;
            right: 0;
            bottom:0;
            display: none;
        }

        .ad>span{
            display: inline-block;
            width: 30px;
            height: 30px;
            position: absolute;
            top: 0px;
            right: 0px;
         
            
        }
    </style>

    <script>
        $(function(){
            $("span").click(function(){
                $(".ad").remove()
            })
            $(".ad").stop().slideDown(1000).fadeOut(500).fadeIn(1000)
        })
    </script>
</head>
<body>
<div class="ad">
    <img src="./img/6.png" alt="">
    <span></span>
</div>
</body>
</html>

相关文章:

  • 2021-12-10
  • 2021-12-20
  • 2022-12-23
  • 2021-12-10
  • 2021-06-09
  • 2022-01-20
  • 2021-06-04
猜你喜欢
  • 2021-12-27
  • 2022-12-23
  • 2022-01-09
  • 2021-07-11
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案