简单的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>
        body{
            margin: 0;
            height: 50rem;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
    </style>
</head>
<body>
    <img src="../assets/wdsj.jpg" alt="示例图片" width="300" height="200">
    <p>我的世界</p>
</body>
</html>

在这里插入图片描述

<!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>
        body{
            margin: 0;
            padding: 0;
        }
        *{
            box-sizing: border-box;
        }
        .head{
            display: flex;
            justify-content: space-between;
            flex-direction: row;
            align-items: center;
            background-color: black;
            height: 8rem;
            padding: 0 1rem;
            color: #ffffff;
        }
        .logo{
            height: 100%;
            line-height: 100%;
            display: flex;
            align-items: center;
        }
        .logo>img{
            height: 2rem;
            margin-right: 0.5rem;
        }
        m>a{
            text-decoration: none;
            color: #ffffff;
        }
        m>a:hover{
            text-decoration: underline;
            text-underline-offset: 0.2rem;
            text-decoration-thickness: 0.2rem;
        }
    </style>
</head>
<body>
    <div class="head">
        <div class="logo">
            <img src="../assets/LOGO.png" height="30" alt="LOGO">
            <span>我的世界</span>
        </div>
        <m>
            <a href="">首页</a>
            <a href="">新闻</a>
            <a href="">游戏</a>
            <a href="">教育</a>
            <a href="">关于我们</a>
        </m>
    <sdfhsioah></sdfhsioah>
    </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>Document</title>
    <style>
        body{
            margin: 0;
        }
        *{
            box-sizing: border-box;
        }
        ul{
            list-style: none;
            padding: 1rem;
            margin: 0;
        }
        ul>li{
            display: flex;
            margin-bottom: 1rem;
        }
        .thumbnail{
            width: 6rem;
            height: 6rem;
            background-color: rgb(0, 55, 255);
            border-radius: 0.4rem;
        }
        .inline-bock{
            display: inline-block;
        }
        .li-right{
            flex-grow: 1;
            border-bottom: 1px solid rgb(128, 128, 128, 0.236);
            display: flex;
            justify-content: space-between;
        }
        .li-title{
            font-size: 1.6rem;
            font-weight: bold;
        }
        .li-subtitle{
            font-size: 0.9rem;
            margin-left: 0.4rem;
            margin-top: 2.5rem;
        }
        .li-km{
            color: rgb(91, 91, 91);
        }
        .mark{
            background-color: rgb(254, 235, 210);
            color: rgb(204, 151, 5);
            padding: 0.2rem 0.4rem;
            display: inline-block;
        }
    </style>
</head>
<body>
    <ul>
        <li>
        <div class="thumbnail"></div>
        <div class="li-right">
            <div>
                <div class="li-title">酥大娘中国烧饼</div>
                <div class="li-subtitle">江宁区</div>
            </div>
            
            <div>
                <div class="mark">点</div>
                <div class="li-subtitle li-km">2.6km</div>
            </div>
        </div>
    </li>
        <li>
            <div class="thumbnail"></div>
            <div class="li-right">
                <div>
                    <div class="li-title">酥大娘中国烧饼</div>
                    <div class="li-subtitle">江宁区</div>
                </div>
                
                <div>
                    <div>
                        <div class="mark">点</div>
                        <div class="mark">预</div>
                    </div>
                    <div class="li-subtitle li-km">2.6km</div>
                </div>
            </div>
        </li>
        <li>
            <div class="thumbnail"></div>
            <div class="li-right">
                <div>
                    <div class="li-title">酥大娘中国烧饼</div>
                    <div class="li-subtitle">江宁区</div>
                </div>
                
                <div>
                    <div class="mark">点</div>
                    <div class="li-subtitle li-km">2.6km</div>
                </div>
            </div>
        </li>
            <li>
                <div class="thumbnail"></div>
                <div class="li-right">
                    <div>
                        <div class="li-title">酥大娘中国烧饼</div>
                        <div class="li-subtitle">江宁区</div>
                    </div>
                    
                    <div>
                        <div>
                            <div class="mark">点</div>
                            <div class="mark">预</div>
                        </div>
                        <div class="li-subtitle li-km">2.6km</div>
                    </div>
                </div>
            </li>
    </ul>
    
</body>
</html>

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sample Layout</title>
    <style>
        *{
            box-sizing: border-box;
        } 
        body{
            margin: 0;
        }
        main{
            padding: 1rem;
        }
        hr{
            border-color: rgb(240, 248, 255, 0.238);
        }
        .card {
            width: 40rem;
            padding: 1rem;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        }
        .card>div{
            padding: 0.5rem;
        }
        .card-head{
            display: flex;
            gap: 1rem;
        }
        .card-head-logo{
            width: 5rem;
            height: 5rem;
        }
        .card-head-logo>img{
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <main>
        <div class="card">
            <div class="card-head">
                <div class="card-head-logo"><img src="../assets/wdsj.jpg" alt="Icon"></div>
                <div>
                    <div style="font-weight: bold;">Title</div>
                    <div style="font-size: 0.8rem; color: rgb(146, 147, 147);">April 01, 2024</div>
                </div>
            </div>
            <hr>
            <div style="font-size: 0.9rem; color: rgb(146, 147, 147);">我的世界我的世界我的世界我</div>
            <hr>
            <div>READ MORE</div>   
        </div>
    </main>
</body>
</html>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值