用html+css写一个网页,包含商铺名称和服装价格
时间: 2023-05-29 19:07:26 浏览: 61
<!DOCTYPE html>
<html>
<head>
<title>商铺名称和服装价格</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
margin: 0;
padding: 0;
}
header {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
}
h1 {
margin: 0;
font-size: 36px;
}
main {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.clothes {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding: 10px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.clothes img {
max-width: 200px;
margin-right: 20px;
}
.clothes h2 {
margin: 0;
font-size: 24px;
}
.clothes p {
margin: 0;
font-size: 18px;
}
</style>
</head>
<body>
<header>
<h1>商铺名称</h1>
</header>
<main>
<div class="clothes">
<img src="https://via.placeholder.com/200x300" alt="Clothes">
<div>
<h2>服装名称</h2>
<p>价格:200元</p>
</div>
</div>
<div class="clothes">
<img src="https://via.placeholder.com/200x300" alt="Clothes">
<div>
<h2>服装名称</h2>
<p>价格:250元</p>
</div>
</div>
<div class="clothes">
<img src="https://via.placeholder.com/200x300" alt="Clothes">
<div>
<h2>服装名称</h2>
<p>价格:180元</p>
</div>
</div>
</main>
</body>
</html>