61,111
社区成员
发帖
与我相关
我的任务
分享
<!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=gb2312" />
<style type="text/css">
<!--
* {margin:0;padding:0}
div {
width:500px;
height:500px;
border:1px solid #666;
overflow:hidden;
position:relative;
display:table-cell;
text-align:center;
}
div span {
bottom:20px;
position:static;
+position:absolute;
top:50%;
}
.aa{
width:200px;
height:100px;
background:red;
position:static;
+position:relative;
left:-50%;
float:left;
margin-right:4px;
}
-->
</style>
</head>
<body>
<div>
<span><div class="aa"></div><div class="aa"></div></span>
</div>
</body>
</html>
<!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>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<style type="text/css">
<!--
* {margin:0;padding:0}
div.box {
width:500px;
height:500px;
border:1px solid #666;
overflow:hidden;
position:relative;
text-align:center;
}
div .spn {
width:500px;
height:100px;
position:absolute;
left:50%;
top:50%;
margin-left:-250px;
margin-top:-50px;
display:block;
text-align:center;
background:blue;
_width:auto;
_left:auto;
_top:50%;
_margin-left:auto;
_margin-top:auto;
}
.aa{
width:200px;
height:100px;
background:red;
display:inline-block/*作用于FF3.0;*/;
margin-right:4px;
_position:relative;
_float:left;
_left:-50%;
}
-->
</style>
</head>
<body>
<div class="box">
<div class="spn">
<div class="aa"></div>
<div class="aa"></div>
</div>
</div>
</body>
</html>