盒子模型问题
为什么我的大盒子最后检查没有高度呢?
为什么我的大盒子最后检查没有高度呢?
2017-09-15
<html>
<head>
<style>
*{
margin: 0;
padding:0;
}
.demo01{
width: 600px;
position: relative;
margin-top:20px;
margin-left:20px;
border: 1px solid red;
}
.demo01 .left{
width: 100px;
float: left;
/*overflow: hidden;*/
}
.demo01 .left img{
width: 100px;
}
.demo01 .right{
width: 450px;
float: right;
border: 1px solid #ccc;
background: #9cf;
padding: 20px;
}
.demo01 .right p{
font-size: 15px;
line-height: 15px;
}
.demo01 .right span{
position: absolute;
right: 20px;
top: 10px;
font-size: 12px;
}
</style>
</head>
<body>
<div class="demo01">
<div class="left"><img src="../images/images_11.gif" alt=""> </div>
<div class="right">
<h6>樱桃小丸子</h6>
<span>10分钟之前</span>
<p>围殴欧文参考下决定欧瑞我去,今天终于上了,学了html和css好开心</p>
</div>
</div>
</body>
</html>
<style>
*{
margin: 0;
padding:0;
}
.demo01{
width: 600px;
position: relative;
margin-top:20px;
margin-left:20px;
border: 1px solid red;
}
.demo01 .left{
width: 100px;
float: left;
/*overflow: hidden;*/
}
.demo01 .left img{
width: 100px;
}
.demo01 .right{
width: 450px;
float: right;
border: 1px solid #ccc;
background: #9cf;
padding: 20px;
}
.demo01 .right p{
font-size: 15px;
line-height: 15px;
}
.demo01 .right span{
position: absolute;
right: 20px;
top: 10px;
font-size: 12px;
}
</style>
</head>
<body>
<div class="demo01">
<div class="left"><img src="../images/images_11.gif" alt=""> </div>
<div class="right">
<h6>樱桃小丸子</h6>
<span>10分钟之前</span>
<p>围殴欧文参考下决定欧瑞我去,今天终于上了,学了html和css好开心</p>
</div>
</div>
body
举报