HTML制作练习

在这里插入图片描述

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商品展示</title>
    <style>
        .container {
            display: flex;
            justify-content: space-around;
            align-items: center;
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        .product {
            width: 45%;
            background-color: #fff;
            border: 1px solid #ddd;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            box-sizing: border-box;
        }
        .product img {
            width: 100%;
            height: auto;
        }
        .product-info {
            padding: 0.5rem;
        }
        .title {
            font-size: 16px;
            font-weight: bold;
            color: #333;
            margin-bottom: 10px;
        }
        .price {
            font-size: 20px;
            color: #e60012;
            margin-bottom: 10px;
        }
        .sales {
            font-size: 14px;
            color: #999;
        }
        .tags {
            font-size: 14px;
            color: #4caf50;
            margin-bottom: 10px;
        }
        .tags-a{
            font-size: 14px;
            color: #f15b54;
            margin-bottom: 10px;
        }
        .tags-b{
            font-size: 14px;
            color: #999;
            margin-bottom: 10px;
        }
        .mark{
            background-color: rgb(233, 69, 69);
            color: rgb(255, 255, 255);
            padding: 0.2rem 0.4rem;
            display: inline-block;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="product">
            <img src="../assets/1.png" alt="商品图片">
            <div class="product-info">
                <span class="mark">国庆大促</span>
                <span class="title">2*1升露露杏仁</span>
                <div class="tags">0元下单 退货包运费</div>
                <span class="price">¥17.9</span>
                <span class="sales">已抢4313</span>
            </div>
        </div>
        <div class="product">
            <img src="../assets/2.png" alt="商品图片">
            <div class="product-info">
                <div class="title">希捷12T银河企业级氦气硬</div>
                <span class="tags">0元下单 </span>
                <span class="tags-a">即将售罄 </span>
                <span class="tags-b">分期付款</span>
                <div>
                    <span class="price">首件¥591.22</span>
                    <span class="sales">已抢73</span>
                </div> 
            </div>
        </div>
    </div>
</body>
</html>

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>商淘云</title>
    <style>
        *{
            box-sizing: border-box;
        }
        html{
            height: 100%;
        }
        body{
            margin: 0;
            height: 100%;
       } 
       a{
            text-decoration: none;
            color: rgb(117, 113, 113);
       }
        .one{
            color: gray;
            background-color: rgba(108, 104, 104, 0.1);
            height: 3rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #ddd;
        }
        .left{
            display: flex;
            margin-left: 2rem;
            align-items: center;
        }
        .right{
            display: flex;
            margin-right: 2rem;
            align-items: center;
        }
        .two{
            height: 6rem;
            border-bottom: 1px solid #ddd;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .right>a{
            font-size: 1.2rem;
            text-decoration: none;
            color: black;
        }
        .three{
            color: gray;
            background-color: rgba(108, 104, 104, 0.1);
            height: 55rem;
            border-bottom: 1px solid #ddd;
        }
        .three-top{
            display: flex;
            justify-content: space-between;
        }
        .three-middle{
            margin-top: 2rem;
            margin-left: 2rem;
            margin-bottom: 2rem;
            display: flex;
            flex-direction: row;
            align-items: center;
        }
        .three-bottom{
            margin-left: 2rem;
            margin-bottom: 2rem;
            margin-right: 2rem;
            display: flex;
            justify-content: space-between;
        }
        img{
            border-radius: 10px;
        }
        .card{
            height: 23.5rem;
            width: 40rem;
            background-color: white;
            margin-top: 2rem;
            margin-right: 2rem;
            margin-left: 2rem;
            object-fit: contain;
            border-radius: 10px;
        }
        .l1{
            margin-top: 1rem;
            margin-left: 2rem;
            background-color: rgb(179, 181, 246);
            color: white;
            padding: 0.2rem 0.4rem;
            display: inline-block; 
        }
        .l2{
            margin-top: 1.5rem;
            margin-left: 2rem;
            background-color: rgb(51, 48, 48);
            color: white;
            padding: 0.2rem 0.4rem;
            display: inline-block; 
        }
        .l3{
            margin-top: 1.5rem;
            margin-left: 2rem;
            background-color: rgb(158, 156, 156);
            color: white;
            padding: 0.2rem 0.4rem;
            display: inline-block; 
        }
 
    </style>
</head>
<body>
    <div class="one">
        <div class="left">
            欢迎来到&nbsp;商淘云
        </div>
        <div>
            <a href="#">商淘软件官网</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="#">交流论坛</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="#">服务频道</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="#">应用市场</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="#">产品体验</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        </div>
    </div>
    <div class="two">
        <div>
            <div class="left">
                <img src="assets/imgs/13.png" alt="shang">
                <div style="color: red;font-size: 2rem;font-weight: bold;">商淘云</div><br>
            </div>
            <div class="left" style="color: rgb(102, 89, 89);">专业电商系统及服务提供商</div>
        </div>
        <div class="right">
            <a href="#">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="#">电商资讯</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="#">运营手册</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="#">精品教程</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="#">用户手册</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="#">产品推荐</a>&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="#">系统下载</a>
        </div>
    </div>
    <div class="three">
        <div class="three-top">
            <div style="margin-top: 2rem;margin-left: 2rem;">
                <img src="../assets/1.jpg" alt="a" height="380px" width="600px">
            </div>
            <div style="margin-top: 2rem;">
                <div style="margin-left: 2rem;"><img src="../assets/2.jpg" alt="b" height="180px"></div>
                <div style="margin-left: 2rem;margin-top: 1rem;"><img src="../assets/3.jpg" alt="c" height="180px"></div>
            </div>
            <div class="card">
                <div style="margin: 1rem;color: black;font-size: 1.4rem;">
                    电商头条
                </div>
                <hr>
                <div class="l1">
                    1
                </div>
                <a href="#" style="color: blue;">疫情之下,社区团购为什么...</a><br>
                <div style="margin-left: 3rem;margin-right: 2rem;">社区团购主要是生活用品,流量能迅速起来,并且能实现五接触配送,商...</div>
                <div class="l2">
                    2
                </div>
                <a href="#" style="color: black;">电商网站建设如何设计商...</a><br>
                <div class="l2">
                    3
                </div>
                <a href="#" style="color: black;">电商网站建设一般会经过...</a><br>
                <div class="l3">
                    4
                </div>
                <a href="#" style="color: black;">商淘多用户系统商城v3.3...</a><br>
                <div class="l3">
                    5
                </div>
                <a href="#" style="color: black;">开源B2B2C商城系统规格...</a>
                </div>
        </div>
 
        <div class="three-middle">
            <div  style="color: black;font-size: 2rem;">软件推荐</div>
            <div style="margin-left: 2rem;">线上+线下&nbsp;电商+店商</div>
        </div>
        
        <div class="three-bottom">
            <div><img src="../assets/4.jpg" alt="1"></div>
            <div><img src="../assets/5.jpg" alt="2"></div>
            <div><img src="../assets/6.jpg" alt="3"></div>
            <div><img src="../assets/7.jpg" alt="4"></div>
        </div>
    </div>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值