div悬浮在屏幕的中间及点击按钮关闭弹出框


#fd {
position: fixed;
z-index: 999;
width: 109px;
height: 323px;
top: 71%;
right: 1%;
margin: -50px 0 0 -50px;
/*border: 1px solid red;*/
}

 

<div id="fd">

</div>

 

/*点击按钮关闭弹出框*/

<div class="close-btn" style=" background-color: #3897E5;">
<a class="text-center" onclick="close1()"><img class="img-responsive center-block" src="img/index/btn_close.png" width="14" height="14" /></a>
</div

<!--
作者:offline
时间:2017-09-27
描述:隐藏联系客户js
-->
<script type="text/javascript">
function close1() { //点击关闭按钮
document.getElementById('fd').style.display = "none";
}

function time() {
if(document.getElementById('fd').style.display == "none") {
document.getElementById('fd').style.display = "block";
}
}
setInterval("time()", 10000);
</script>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM