最新公告
  • 欢迎您光临 我爱模板网,本站秉承服务宗旨 履行“站长”责任,销售只是起点 服务永无止境! 立即加入钻石VIP
  • 适合帝国cms的可关闭两边飘浮对联广告代码jquery特效

    正文概述 管理员   2025-09-06   5

    将以下代码加到需要的模板即可,在页面两侧均可显示广告位置,漂浮

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>  
    <script type="text/javascript">  
    $(document).ready(function(){  
     var duilian = $("div.duilian");  
     var duilian_close = $("a.duilian_close");  
         
     var screen_w = screen.width;  
     if(screen_w>1024){duilian.show();}  
     $(window).scroll(function(){  
      var scrollTop = $(window).scrollTop();  
      duilian.stop().animate({top:scrollTop+260});  
     });  
     duilian_close.click(function(){  
      $(this).parent().hide();  
      return false;  
     });  
         
         
    });  
    </script>  
    <style>  
    /*下面是对联广告的css代码*/
    .duilian{top:260px;position:absolute; width:102px; overflow:hidden; display:none;}  
    .duilian_left{ left:6px;}  
    .duilian_right{right:6px;}  
    .duilian_con{border:#CCC solid 1px; width:100px; height:300px; overflow:hidden;}  
    .duilian_close{ width:100%; height:24px; line-height:24px; text-align:center; display:block; font-size:13px; color:#555555; text-decoration:none;}  
    </style>  
        
        
    <!--下面是对联广告的html代码结构-->  
    <div class="duilian duilian_left">  
     <div class="duilian_con">对联的内容</div>  
        <a href="#" class="duilian_close">X关闭</a>  
    </div>  
    <div class="duilian duilian_right">  
     <div class="duilian_con">对联的内容</div>  
        <a href="#" class="duilian_close">X关闭</a>  
    </div>

    我爱模板网 » 适合帝国cms的可关闭两边飘浮对联广告代码jquery特效

    发表评论

    如需帝国cms功能定制以及二次开发请联系我们

    联系作者
    script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?587cc1e5c052b5b0ce99533beff13c96"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })();

    请选择支付方式

    ×
    支付宝支付
    余额支付
    ×
    微信扫码支付 0 元