本文主要是介绍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
* {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;
}
效果
这篇关于html第二次作业的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!