0
点赞
收藏
分享

微信扫一扫

Web_PHP_DedeCMS_居中弹窗;


功能:使用DIV实现居中弹窗闲谈;


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
    <title>弹窗</title>
	<style type="text/css">
		#outdiv {
			/*固定*/
			position:fixed;
			width:100%;
			top:30%;
		}
		#indiv {
			/*相对*/
			position:relative;
			margin:0px auto;
			/*图片宽高*/
			width:224px;
			height:134px;
		}
		#closea {
			position:relative;
			top: 28px;
			left: 196px;
			cursor:pointer;
		}
		#cimg {
			width:25px;
			height:25px;
		}
	</style>
</head>
<body>
cyb<br />
cyb<br />
cyb<br />
cyb<br />
	<div id="outdiv">
		<div id="indiv">
			<a id="closea" title="关闭" οnclick="javascript:hidew();"><img id="cimg" src="images/close.jpg" /></a>
			<a id="linka" href="" target="_blank" title="咨询咨询">
				<img id="limg" src="images/center.gif" />
			</a>
		</div>
	</div>
	<script type="text/javascript">
		function showw() {
			outdiv.style.display="block";
			console.log("=>showTheWindows;");
		}
		function hidew() {
			outdiv.style.display="none";
			setTimeout("showw()", 4000);
			console.log("=>hideTheWindows;");
		}
	</script>
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
cyb<br />
</body>
</html>




举报

相关推荐

0 条评论