麻烦老师检查有没有错误的地方
来源:3-17 编程练习
dww1
2022-05-31 00:08:37
<style>
* {
margin: 0;
padding: 0;
}
/* 头部 */
header {
display: flex;
width: 100%;
height: 80px;
justify-content: space-around;
background-color: #000;
}
.logo {
display: flex;
height: 100%;
justify-content: center;
align-items: center;
}
.logo img{
height: 80px;
vertical-align: middle;
}
.nav {
display: flex;
width: 40%;
}
li {
list-style: none;
font-size: 24px;
color: #fff;
display: flex;
flex: 1;
align-items: center;
justify-content: center;
}
.login {
display: flex;
width: 160px;
align-items: center;
justify-content: space-around;
}
.login input {
display: flex;
justify-content: center;
align-items: center;
width: 50px;
height: 40px;
background-color: rgb(246, 166, 18);
border: none;
color: #fff;
font-size: 16px;
border-radius: 10px;
}
/* 主体内容 */
section {
display: flex;
flex-wrap: wrap;
width: 100%;
justify-content: space-around;
}
.section {
display: flex;
width: 40%;
height: 180px;
background-color: rgb(162, 217, 254);
justify-content: space-around;
align-items: center;
margin-top: 40px;
border-radius: 10px;
}
.section .box div{
margin-top: 20px;
}
.shopping{
display: flex;
background-color: rgb(235, 166, 37,.9);
width: 100px;
height: 40px;
justify-content: center;
align-items: center;
font-size: 16px;
color: #fff;
border: none;
border-radius: 10px;
}
</style><!-- 头部 --> <header> <div class="logo"> <img src="http://climg.mukewang.com/59197ab000014f1503000100.jpg" alt=""> </div> <ul class="nav"> <li>课程</li> <li>路径</li> <li>猿问</li> <li>手记</li> </ul> <div class="login"> <input type="button" value="登录"> <input type="button" value="注册"> </div> </header> <!-- 主体内容 --> <section> <div class="section"> <div class="box"> <p>《前端小白入门手册》</p> <div>适用人群:没有任何前端基础的小白</div> <div>费用:¥499</div> </div> <div class="shopping"> <div class="btn">加入购物车</div> </div> </div> <div class="section"> <div class="box"> <p>《HTML5月CSS3实现动态网页》</p> <div>适用人群:有html和css基础的童鞋</div> <div>费用:¥599</div> </div> <div class="shopping"> <div class="btn">加入购物车</div> </div> </div> <div class="section"> <div class="box"> <p>《从h5网页开发到移动端响应式开发》</p> <div>适用人群:有html,css,js,jQ基础的童鞋</div> <div>费用:¥599</div> </div> <div class="shopping"> <div class="btn">加入购物车</div> </div> </div> <div class="section"> <div class="box"> <p>《从h5网页开发到移动端响应式开发》</p> <div>适用人群:有html,css,js,jQ基础的童鞋</div> <div>费用:¥599</div> </div> <div class="shopping"> <div class="btn">加入购物车</div> </div> </div> </section>
1回答
好帮手慕久久
2022-05-31
同学你好,代码没有错误的地方,也不需要优化了,很棒!
祝学习愉快!
相似问题