慕斯3383268
2016-01-21 10:05
搞不清继承这里晕
father is "position:relative"
son is "position:absolute"
son is in father's heart
除了border以外,小的跟大的格式一致
#box3{
width:200px;
height:200px;
position:relative;
}
#box4{
width:99%;
position:absolute;
bottom:0;
}
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>对齐</title>
<style type="text/css">
div{text-align:center;}
</style>
</head>
<body>
<div><img src="http://img.mukewang.com/52b4113500018cf102000200.jpg" ></div>
</body>
</html>
初识HTML(5)+CSS(3)-升级版
1225817 学习 · 18235 问题
相似问题