css实现的对联广告代码
css 代码
代码如下:
.couplet_ad /* 底部固定*/{position:fixed;bottom:auto; top:0; width: 120px; height: 230px; z-index:99999; margin-top:158px;} * html .couplet_ad /* IE6 底部固定*/{_position:absolute; _bottom:auto; _top:expression(eval(document.documentElement.scrollTop));} .couplet_ad a{ display:block; cursor:pointer;} #ad_left{ left: 0px;} #ad_right{ right: 0px;}
html代码(下代码直接放到html中即可)
对联广告左边
代码如下:
<div class="couplet_ad" id="ad_left"> <a target="_blank" href=""><img src="dl.jpg"></a> <a onClick="ad_left();">关闭</a> </div>
对联广告右边
代码如下:
<div class="couplet_ad" id="ad_right"> <a target="_blank" href=""><img src="dl.jpg"></a> <a onClick="ad_right();">关闭</a> </div>
这个js是关闭按钮代码
代码如下:
<script language="javascript"> function ad_left(){ document.getElementById('ad_left').style.display="none"; } function ad_right(){ document.getElementById('ad_right').style.display="none"; } </script>
相关推荐
qiupu 2020-11-04
多读书读好书 2020-11-03
RedCode 2020-10-28
jiedinghui 2020-10-25
Ladyseven 2020-10-22
hellowzm 2020-10-12
zuncle 2020-09-28
Ladyseven 2020-09-11
jiedinghui 2020-09-07
xiaohuli 2020-09-02
葉無聞 2020-09-01
impress 2020-08-26
ThikHome 2020-08-24
nicepainkiller 2020-08-20
hellowzm 2020-08-18