div底部对齐

来源:互联网 发布:java中md5 32 编辑:程序博客网 时间:2024/04/28 13:37
<!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" />
<title>无标题文档 </title>
</head>
<style>
.c1{
height:100px;
width:100px;
position:relative;
border:1px solid #0000FF;
}
.c2{
position:absolute;
bottom:0px;
height:20px;
width:50px;
background-color:#FF0000;
}
</style>
<body>
<div class="c1">
<div class="c2"> </div>
</div>
</body>
</html>
position:absolute;bottom:0px;
原创粉丝点击