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;
}

效果

相关推荐
冰万森6 小时前
解决 React 项目初始化(npx create-react-app)速度慢的 7 个实用方案
前端·react.js·前端框架
牧羊人_myr6 小时前
Ajax 技术详解
前端
浩男孩7 小时前
🍀封装个 Button 组件,使用 vitest 来测试一下
前端
蓝银草同学7 小时前
阿里 Iconfont 项目丢失?手把手教你将已引用的 SVG 图标下载到本地
前端·icon
布列瑟农的星空7 小时前
重学React —— React事件机制 vs 浏览器事件机制
前端
一小池勺7 小时前
CommonJS
前端·面试
孙牛牛7 小时前
实战分享:一招解决嵌套依赖版本失控问题,以 undici 为例
前端
用户52709648744907 小时前
Git 最佳实践
前端
星秀日7 小时前
JavaWeb--Ajax
前端·javascript·ajax