<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
padding: 0PX;
margin: 0PX;
}
.c2{
margin: 220px auto;
width: 1200px;
/*background: #7C8E87;*/
}
.c1{
width: 260px;
height: 300px;
padding: 8px 8px;
border: 2px solid white;
}
.c1:hover{
border: 2px solid #90c7d6;
}
.a1,.a2,.a3,.a4{
background-image: url(img/360截图20181213133428644.jpg);
width: 230px;
height: 230px;
margin: 0px auto;
}
p{
padding: 4px;
}
.c1{
display: inline-block
}
a{
text-decoration: none;
color: #000000;
}
</style>
</head>
<body>
<div class="c2">
<div class="c1">
<div class="a1"></div>
<p><b>昌平区城北街道</b></p>
<p style="text-indent: 15px; background-image: url(img/360截图20181213142528263.jpg); background-repeat: no-repeat;"><a href="">昌平区东关十字路口东北侧</a></p>
</div>
<div class="c1">
<div class="a2"></div>
<p><b>昌平区城北街道</b></p>
<p style="text-indent: 15px; background-image: url(img/360截图20181213142528263.jpg); background-repeat: no-repeat;"><a href="">昌平区东关十字路口东北侧</a></p>
</div>
<div class="c1">
<div class="a3"></div>
<p><b>昌平区城北街道</b></p>
<p style="text-indent: 15px; background-image: url(img/360截图20181213142528263.jpg); background-repeat: no-repeat;"><a href="">昌平区东关十字路口东北侧</a></p>
</div>
<div class="c1">
<div class="a4"></div>
<p><b>昌平区城北街道</b></p>
<p style="text-indent: 15px; background-image: url(img/360截图20181213142528263.jpg); background-repeat: no-repeat;"><a href="">昌平区东关十字路口东北侧</a></p>
</div>
</div>
</body>
</html>
Padding占内容高度
Padding;用于控制内容与元素之间的距离
Maring;用于控制元素与元素之间的距离