html第二次作业

骨架

html 复制代码
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./小米.css">
</head>
<body>
    <div class="father">
        <div class="left"></div>

        <div class="right">
            <ul>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
                <li></li>
            </ul>

        </div>
    </div>
</body>
</html>

css

html 复制代码
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}


.father{
    width: 1240px;
    height: 628px;
    background-color: blue;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-flow:row;
}

.left{
    width: 247px;
    height: 614px;
    background-color: pink;
}

.right{
    width: 978px;
    height: 628px;
    background-color: aqua;
    border: 0px;
    display: flex;

}

.ul{
    width: 992px;
    height: 614px;
    padding-left: 14px;
    display: flex;
    justify-content: space-between;

}

li {
    list-style: none;
}
.father li {
    width: 234px;
    height: 300px;
    background-color:red ;
    margin: 0px 9px 9px 0px;
    display: inline-block;
}

.father li:nth-child(4n){
    margin-right: 0;
}

效果

相关推荐
我去流水了1 分钟前
【独家免费】【亲测】在linux下嵌入式linux的web http服务【Get、Post】,移植mongoose,post上传文件
linux·运维·前端
Mintopia4 分钟前
世界头部大厂的研发如何使用 AI-Coding?
前端
wuhen_n4 分钟前
响应式图片的工程化实践:srcset与picture
前端·javascript·vue.js
学博成7 分钟前
centos7.9 安装 Firefox
前端·firefox
wuhen_n7 分钟前
CDN图片服务与动态参数优化
前端·javascript·vue.js
郝学胜-神的一滴10 分钟前
深入理解Python生成器:从基础到斐波那契实战
开发语言·前端·python·程序人生
Mintopia19 分钟前
为什么要有 Neovate Code?
前端
IT_陈寒24 分钟前
SpringBoot 项目启动慢?5 个提速技巧让你的应用快如闪电 ⚡️
前端·人工智能·后端
IT_陈寒27 分钟前
SpringBoot自动配置的坑,我把头发都快薅没了
前端·人工智能·后端
xkxnq31 分钟前
第六阶段:Vue生态高级整合与优化(第96天) Vue i18n优化:语言包按需加载+缓存当前语言+避免页面刷新失效
前端·vue.js·缓存