定位和居中问题
作者:梁远超
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>定位和居中问题</title>
<link rel="stylesheet" type="text/css" href="css/new_file.css"/>
</head>
<body>
<div id="Frame">
<div class="Circular" id="Circular-A"></div>
<div class="Circular" id="Circular-B"></div>
</div>
</body>
</html>
*{
border: 0;
}
#Frame{
height: 200px;
width: 400px;
background-color: #ccc;
position: fixed;
left: 50%;
top: 50%;
margin-top: -100px;
margin-left: -200px;
overflow:hidden;
}
.Circular{
background-color: #fc0;
border-radius: 50%;
width: 100px;
height: 100px;
}
#Circular-A{
margin-top: -50px;
margin-left: -50px;
}
#Circular-B{
margin-top: 100px;
margin-left: 350px;
}