<!doctype?html>
<html>
<head>
<meta?charset="utf-8">
<title>全屏居中</title>
<style>
/*重置*/
body,ul,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,p,input,b{?margin:0;?padding:0;?font-family:"微軟雅黑";?font-size:12px;}
body,html{?overflow:hidden;?background:#E0E0E0;}
body{?position:relative;}
li{?list-style:none;}
a{?text-decoration:none;}
.clearfix:after{?content:".";?height:0;?visibility:hidden;?display:block;?clear:both;}
/*主要內容*/
.contbox{?width:600px;?height:500px;?background:#fff;?position:absolute;?top:50%;?left:50%;?margin-top:-250px;?margin-left:-300px;}
</style>
</head>
<body>
<div?class="contbox">
??????<h1>該語種網站正在建設中</h1>
??????<h5>敬請期待...</h5>
</div>
</body>
</html>
怎樣讓內容居中在瀏覽器屏幕中間?使用定位后這個內容就不見了
江南京華夢3822496
2017-02-16 22:32:57