简单的底部悬浮html代码

发表于 2019-08-07   |   分类于 web前端 , 网站知识
<div style="position: fixed; bottom: 0px; left: 0px; width: 100%;"><img style="width: 100%;  height: 100%;" src="https://www.baidu.com/img/dong_7d4baac2f4dee0fab1938d2569f42034.gif"></div>

加个关闭的按钮

<div id="ads" style="width:100%;position:fixed;bottom:0;left:0;z-index:2147483647;">
<a href="javascript:void(0);" onclick="document.getElementById('ads').style.display='none'">
<img style="cursor:pointer;width:20px;height:20px;border:0px;position:absolute;top:-20px;right:0px;" src="http://static.jointreport-switch.com/images/close.png">
</a>
<center>
<a  target="_blank">
<img src="https://img.alicdn.com/simba/img/TB1iXsxLNTpK1RjSZR0SuvEwXXa.jpg" width="100%">
</a>
</center>
© 2019 Powered by Typecho & Theme Quark