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

效果

相关推荐
_Kayo_几秒前
vue3 computed 练习笔记
前端·vue.js·笔记
CodeSheep4 分钟前
VS 2026 正式发布,王炸!
前端·后端·程序员
无奈何杨4 分钟前
CoolGuard事件查询增加策略和规则筛选,条件结果展示
前端·后端
梦里不知身是客118 分钟前
正则表达式常见的介绍
前端·javascript·正则表达式
小小测试开发24 分钟前
JMeter XPath提取器用法详解:XML/HTML响应数据提取神器
xml·jmeter·html
初学小白...25 分钟前
HTML知识点
前端·javascript·html
鹏多多27 分钟前
flutter睡眠与冥想数据可视化神器:sleep_stage_chart插件全解析
android·前端·flutter
艾小码37 分钟前
Vue3 脚本革命:<script setup> 让你的代码简洁到飞起!
前端·javascript·vue.js
IT_陈寒1 小时前
Python 3.12新特性解析:10个让你代码效率提升30%的实用技巧
前端·人工智能·后端
故厶1 小时前
webpack实战
前端·javascript·webpack