| 123456789101112131415161718192021222324252627282930 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Document</title>
- <style>
- .product-card{
- width: 400px;
- height: 500px;
- border:1px solid black;
- margin: 0 auto;
- padding:40px;
- }
- .product-img{
- width: 400px;
-
- }
- </style>
- </head>
- <body>
- <!-- 类起名 1、要做见名知意。2、如果多个单词 用短横线连接起来 -->
- <div class="product-card">
- <img class="product-img" src="./img/phone.png" alt="商品图片">
- <h2 class="product-name">精美智能手机</h2>
- <p>高清屏幕,强大性能,出色拍照。</p>
- <p>价格:¥3999</p>
- </div>
- </body>
- </html>
|