写一个纯HTML+CSS的网购网页
<!DOCTYPE html>
<html>
<head>
<title>网购网页</title>
<style>
body {
font-family: Arial, sans-serif;
}
<pre><code>header {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}
.container {
display: flex;
justify-content: space-between;
padding: 20px;
}
.product {
width: 30%;
border: 1px solid #ccc;
padding: 10px;
margin-bottom: 20px;
}
.product img {
width: 100%;
}
.product h3 {
margin-top: 10px;
}
.product p {
color: #888;
}
.footer {
background-color: #333;
color: #fff;
padding: 10px;
text-align: center;
}
</code></pre>
</style>
</head>
<body>
<header>
<h1>网购网页</h1>
</header>
<div class="container">
<div class="product">
<img src="product1.jpg" alt="Product 1">
<h3>产品1</h3>
<p>价格:$10</p>
<button>购买</button>
</div>
<pre><code><div class="product">
<img src="product2.jpg" alt="Product 2">
<h3>产品2</h3>
<p>价格:$15</p>
<button>购买</button>
</div>
<div class="product">
<img src="product3.jpg" alt="Product 3">
<h3>产品3</h3>
<p>价格:$20</p>
<button>购买</button>
</div>
</code></pre>
</div>
<footer class="footer">
<p>版权所有 © 2021 网购网页</p>
</footer>
</body>
</html
原文地址: https://www.cveoy.top/t/topic/hIdL 著作权归作者所有。请勿转载和采集!