61,112
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<style>
#div1 {
border:1px red solid;
width: 100%;
height: 570px;
min-width: 1200px;
}
#div2 {
border: 1px red solid;
position: absolute;
left: 50%;
top: 285px;
margin-left: -300px;
background: url('/home/tpl/pc/img/bg1.png') repeat;
width: 640px;
padding-top: 20px;
padding-bottom: 20px;
padding-left: 40px;
padding-right: 40px;
border-radius: 8px;
}
</style>
</head>
<body>
<div id="div1" >
<div id="div2" >
</div>
</div>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title> 页面名称 </title>
<style type="text/css">
#div0 {
display:table;
width: 100%;
min-height:735px;
}
#div1 {
display:table-cell;
vertical-align:middle;
text-align:center;
background-color: #999999;
}
#div2 {
display:inline-block;
text-align:center;
background-color: #FFCCFF;
}
</style>
</head>
<body>
<div id="div0"><div id="div1">
<div id="div2">
<p>ggggggggggggggggggggggggggggggggggg</p>
<p>ggggggggggggggggggggggggggggggggggg</p>
<p>ggggggggggggggggggggggggggggggggggg</p>
<p>ggggggggggggggggggggggggggggggggggg</p>
</div>
</div></div>
</body>
</html>