麻烦老师看看代码对吗?
来源:3-17 编程练习
淡淡嚣风
2021-07-14 22:11:26
相关代码:
<!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>
<style>
/* 在此处补充代码*/
* {
margin: 0;
padding: 0;
}
header {
display: flex;
justify-content: space-around;
background-color: #000;
}
header .logo {
display: flex;
align-items: center;
}
header .logo img {
height: 60px;
}
header .nav {
display: flex;
width: 500px;
align-items: center;
justify-content: space-around;
}
header .nav li {
list-style: none;
color: #fff;
}
header .login {
display: flex;
justify-content: space-between;
width: 100px;
align-items: center;
}
header .login input {
width: 40px;
background-color: orange;
color: #fff;
outline: none;
cursor: pointer;
border: none;
border-radius: 2px;
padding: 3px 0;
}
section {
height: 300px;
display: flex;
flex-wrap: wrap;
align-content: space-evenly;
justify-content: space-around;
}
section .section {
display: flex;
width: 580px;
background-color: #add8e6;
border-radius: 5px;
justify-content: space-around;
align-items: center;
}
section .section .box {
display: flex;
width: 330px;
height: 100px;
flex-direction: column;
justify-content: space-around;
padding: 10px;
}
section .section .shopping {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
width: 90px;
height: 30px;
background-color: orange;
color: #fff;
cursor: pointer;
border: none;
border-radius: 5px;
padding: 3px 0;
}
section .section .shopping .btn {
display: flex;
font-size: 15px;
font-weight: 700;
}
</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>《HTML网页开发到移动端响应式开发》</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>《HTML网页开发到移动端响应式开发》</p>
<div>适用人群:有html、css、js、JQ基础的童鞋</div>
<div>费用:¥599</div>
</div>
<div class="shopping">
<div class="btn">加入购物车</div>
</div>
</div>
</section>
</body>
</html>
1回答
同学你好,代码正确,效果实现的很棒,祝学习愉快~
相似问题