老师帮忙看一下有无需要改进的地方
来源:3-17 编程练习
情分的小前端
2022-03-06 17:55:51
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title></title>
<style>
/* 在此处补充代码*/
* {
margin: 0;
padding: 0;
}
li {
list-style: none;
}
body {
min-width: 882px;
}
header {
display: flex;
width: 100%;
height: 80px;
justify-content: space-around;
background-color: black;
}
header .logo {
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
header .logo img {
height: 60px;
}
header .nav {
display: flex;
justify-content: space-around;
align-items: center;
width: 45%;
}
header .nav li {
color: white;
}
header .login {
width: 200px;
display: flex;
justify-content: space-around;
align-items: center;
}
header .login input {
width: 70px;
height: 30px;
background-color: orange;
color: white;
outline: none;
border: none;
border-radius: 5px;
}
section {
width: 100%;
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
section .section {
background-color: rgba(38, 170, 231, 0.5);
padding: 20px;
margin-top: 20px;
border-radius: 5px;
display: flex;
flex-basis: 40%;
justify-content: space-around;
}
section .section .box {
display: flex;
flex-direction: column;
/* align-content: space-around; */
}
section .section .box div {
margin-top: 15px;
}
section .section .shopping {
display: flex;
justify-content: center;
align-items: center;
}
section .section .shopping .btn {
background-color: orange;
padding: 10px;
border-radius: 10px;
color: white;
width: 100px;
height: 40px;
box-sizing: border-box;
}
</style>
</head>
<body>
<!-- 头部 -->
<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>《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>《HTML5月CSS3实现动态网页》</p>
<div>适用人群:有html和css基础的童鞋</div>
<div>费用:¥599</div>
</div>
<div class="shopping">
<div class="btn">加入购物车</div>
</div>
</div>
</section>
</body>
</html>
1回答
好帮手慕然然
2022-03-06
同学你好,代码实现很棒,不需要优化,继续加油,祝学习愉快!
相似问题
回答 1
回答 1
回答 1
回答 1
回答 1