js+css+html实现网站底部悬浮广告带关闭按钮

底部悬浮广告

利用js+css+html实现网站底部悬浮广告带关闭按钮

CSS部分

<style>
body { background-image:url(text.txt); /* for IE6 */
background-attachment:fixed; }
#bottomNav { background-color:#fff0; z-index:999; position:fixed; bottom:0; left:0; width:100%; _position:absolute; /* for IE6 */
_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); /* for IE6 */ overflow:visible; }
</style>

js部分

<script>
function CloseDiv(div) {
document.getElementById(div).style.display = 'none';
};
</script>

代码部分

<div id="bottomNav">
<div id="MyDiv">
<center>
<a href="https://xxx.com" rel="nofollow" target="_blank">
<img src="https://xxx.com/xxx.jpg" title="AD" />
</a>
<span onclick="CloseDiv('MyDiv')">关闭</span>
</center>
</div>
</div>

END拜拜ヾ(•ω•`)o

发表回复

后才能评论