盒子模型有四个部分
- 边框
- 内容
- 外边框
- 内边框
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<style>
body {
background-color: darkgray;
}
* {
margin:0;
padding:0;
}
.box{
width:234px;
height:400px;
background-color:white;
margin:100px auto;
}
.box img{
width:100%;
}
.review {
height:40px;
font-size:14px;
padding:0 28px;
margin-top:20px;
}
.appraise {
font-size: 12px;
color: #dfdcda;
margin-top:20px;
padding:0 28px;
}
.info {
font-size: 14px;
margin-top: 10px;
padding: 0 28px;
}
.info h4 {
display: inline-block;
font-weight:400;
}
.info span{
color:darkgoldenrod;
}
</style>
</head>
<body>
<div class="box">
<img src="xiaomi2.png" alt="Alternate Text"/>
<p class="review">哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈</p>
<div class="appraise">评价都不错</div>
<div class="info">
<h4>平衡车啦啦</h4>
|<span>喜欢</span>
</div>
</div>
</body>
</html>