代码:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>三明治</title>
<style>
* {
margin: 0;
padding: 0;
}
.box {
overflow: hidden;
width: 800px;
height: 533px;
margin: 100px auto;
background: url(img/bg_3.svg) no-repeat 8% 13%/35% 11%, url(img/bg_2.png) no-repeat left top/100% 100%, url(img/bg_1.png) no-repeat left top/100% 100%;
}
h3 {
font-weight: 400;
width: 640px;
height: 138px;
font-size: 30px;
line-height: 138px;
padding: 0 80px;
}
.content {
width: 680px;
padding: 0 60px;
}
ul {
display: inline-block;
width: 100%;
height: 100%;
}
ul li {
display: inline-block;
width: 150px;
height: 250px;
background-color: green;
margin-right: 16px;
}
ul li img {
width: 100%;
}
ul li h4 {
font-size: 13px;
margin-bottom: 20px;
}
ul li p {
font-size: 12px;
margin-bottom: 8px;
}
ul li span {
font-weight: 700;
font-size: 13px;
}
.content a {
display: block;
width: 146px;
height: 35px;
background-color: #c6d56e;
border: 2px solid #010000;
text-align: center;
margin-top: 12px;
margin-left: 503px;
line-height: 35px;
text-decoration: none;
color: #000;
font-size: 14px;
}
</style>
</head>
<body>
<div class="box">
<h3>普通三明治</h3>
<div class="content">
<ul>
<li>
<img src="img/pic1.png" alt="">
<h4>南瓜Keema咖喱沙</h4>
<p>南瓜的甜味和咖喱的辛辣味完美地融合在一起!李子和核桃的口味是</p>
<span>¥750</span>
</li>
<li>
<img src="img/pic2.png" alt="">
<h4>西式蘑菇炒蛋沙</h4>
<p>蓬松的炒鸡蛋和大量的蘑菇,上面放有丰富的番茄酱和奶酪粉</p>
<span>¥600</span>
<li>
<img src="img/pic3.png" alt="">
<h4>咸蛋t沙</h4>
<p>健康,多汁的沙子和柔软的鸡胸肉,配以凤尾鱼等等塔纳德酱</p>
<span>¥700</span>
<li>
<img src="img/pic4.png" alt="">
<h4>爆米花虾沙</h4>
<p>丰满的虾和塔塔酱展现出绝佳的组合</p>
<span>¥800</span>
</li>
</ul>
<a href="#">查看更多</a>
</div>
</div>
</body>
</html>