一个随机秒数广告html代码弹窗

  • 内容
  • 相关

资源简介

点击关闭后 在15秒内 里面选择一个随机秒数自己又弹出来,可以拿去加到自己网站里面 源码

 

代码:

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>4dn.net</title>


 <!-- 将从下面代码复制粘贴到需要添加的页面中 此段开始-->
    <style type="text/css">
        div {
            width: 200px;
            height: 400px;
            position: fixed;
            bottom: 0;
            right: 0;
            background: tomato;
            text-align: right;
            transition: 1s;
        }
        
        a {
            text-align: center;
            font-weight: 700;
            display: block;
        }
    </style>
</head>

<body>
    <div id="d1">
        <button id="btn">x</button>
        <a href="http://">这里是个a链接</a>
    </div>
    <script type="text/javascript">
        btn.onclick = function() {
            this.parentNode.style.bottom = "-100%";
            setTimeout(function() {
                d1.style.bottom = "0%";
            }, Math.random() * 15000);
        }
    </script>

 <!-- 此段代码结束 -->


</body>

</html>

17301b6e67bf4b51.jpg

黑蜘蛛

本文标签:

版权声明:若无特殊注明,本文皆为《ღ軍尐ღ》原创,转载请保留文章出处。

字数统计:本文共有 《755》 个。

本文链接:一个随机秒数广告html代码弹窗 - https://www.4dn.net/jsxx/249.html