首页 > Web开发 > 详细

网页首页广告显示缓慢向上消失

时间:2015-07-24 00:15:51      阅读:286      评论:0      收藏:0      [点我收藏+]

    <div class="index_top">
        <!-- 顶部出现几秒后图片缓慢消失 -->
        <script language="javascript" type="text/javascript">
            window.onload = function () {

                var fudongAD = document.getElementById("headads");

                setTimeout("noneheadads()", 200); //停留时间自己适当调整


            }
            var height2 = 450; //高度
            function noneheadads() {
                height2 = height2 - 10;
                if (height2 <= 0) {
                    document.getElementById("headads").style.display = "none";
                    //                document.getElementById("toubiao").style.display = "block";
                    return;
                }
                document.getElementById("headads").style.height = height2 + "px";
                setTimeout("noneheadads()", 40);

            }

        </script>
        <div id="headads" style="margin: 0 auto; overflow: hidden;">
            <a href="http://mall.orangebank.com.cn/fmall/baihe/baihe.xhtml" target="_blank">
                <img src="http://static.baiinfo.com/image/20150722/20150722170115_5019.jpg" /></a></div>
        <div id="toubiao" style="display: none">
            <img src="@Url.Content("~/Content/Images/992_450.jpg")"  />
        </div>
    </div>

网页首页广告显示缓慢向上消失

原文:http://7392989.blog.51cto.com/7382989/1677593

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