结合盒子模型,发布一张你的卡片
通过对图片进行定位,对其描述实现下图所示效果
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>个人名片</title>
<style type="text/css">
body{
margin:0;
padding:0;
/*background:url(https://img-blog.csdn.net/20170419205321811) no-repeat;*/
}
.border{
position: absolute;
left: 40%;
right: 60%;
width: 600px;
height: 450px;
margin:80px 0 0 -200px;
border:3px solid black;
background: url(images/2.jpg) no-repeat;
}
.descrption{
position: absolute;
left: 40%;
right: 60%;
width: 600px;
height: 170px;
margin:420px 0 0 -200px;
/*background: gray;*/
text-align: center;
font-size: 18px;
font-family: "楷体";
}
</style>
</head>
<body>
<div class="border">
</div>
<div class="descrption">
<p>夕阳的美在于它不过于的绚灿,在于它和谐、宁静、柔美</p>
<p>如一位情窦初开的少女含羞微笑的容颜,让人感觉美丽后面的心悸和动人.</p>
</div>
</body>
</html>