老师检查一下,有哪些地方需要优化的
来源:3-17 编程练习
Javed
2021-04-29 15:38:30
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
/* 在此处补充代码*/
* {
margin: 0;
padding: 0;
}
header {
width: 100%;
margin: 0px auto;
display: flex;
background-color: black;
justify-content: space-around;
align-items: center;
}
.img {
vertical-align: middle;
}
.nav {
width: 700px;
}
li {
color: white;
list-style: none;
}
.btn {
background-color: orange;
width: 120px;
height: 50px;
border: 1px solid orange;
border-radius: 8px;
color: white;
text-align: center;
line-height: 50px;
font-size: 20px;
font-weight: bold;
}
input {
border: 1px solid orange;
background-color: orange;
color: white;
width: 70px;
height: 40px;
border-radius: 7%;
margin-right: 10px;
}
header .logo,
header .nav,
header .login {
display: flex;
align-items: center;
justify-content: space-around;
}
section {
padding-top: 15px;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
}
section .section {
display: flex;
justify-content: space-around;
background-color: rgb(104, 196, 224);
width: 40%;
height: 150px;
border: 1px solid rgb(104, 196, 224);
border-radius: 5px;
margin-bottom: 20px;
}
section .section .box {
display: flex;
flex-direction: column;
justify-content: space-around;
font-size: 25px;
}
section .section .shopping {
display: flex;
flex-direction: column;
justify-content: space-around;
}
</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>《前端小白入门手册》</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>
</section>
</body>
</html>
1回答
好帮手慕星星
2021-04-29
同学你好,代码实现效果很棒,不需要优化了。继续加油,祝学习愉快!
相似问题
回答 1
回答 1
回答 1
回答 1
回答 1