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
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。