3-17 请老师检查下代码,谢谢

来源:3-17 编程练习

不厌_

2021-07-25 14:59:52

相关代码:

​<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title></title>
<style>
/* 在此处补充代码*/
* {
margin: 0;
padding: 0;
}
ul{
list-style: none;
}
html {
height: 100%;
}
body {
height: 100%;
display: flex;
flex-direction: column;
}
/* 头部 */
header {
display: flex;
background-color: black;
justify-content: space-around;
}
header .nav {
width: 400px;
display: flex;
color: white;
align-items: center;
}
header .nav li {
flex: 1;
display: flex;
justify-content: center;
}
header .login {
display: flex;
align-items: center;
}
header .login input {
margin-right: 20px;
padding: 3px;
border: none;
color: white;
font-size: 16px;
border-radius: 10%;
background-color: orange;
}
header .login input:last-child {
margin-right: 0;
}
/* 主体内容布局 */
section {
height: 400px;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
align-content: space-around;
}
section .section {
width: 45%;
height: 150px;
background-color: paleturquoise;
border-radius: 10px;
display: flex;
justify-content: space-around;
}
section .section .box{
display: flex;
flex-direction: column;
justify-content: space-around;
font-weight: bold;
}
section .section .shopping {
display: flex;
justify-content: center;
align-items: center;
}
section .section .shopping .btn {
color: white;
padding: 5px;
background-color: orange;
border-radius: 5px;
}
</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>《从H5网页开发到移动端响应式开发》</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基础的童鞋</div>
<div>费用:¥599</div>
</div>
<div class="shopping">
<div class="btn">加入购物车</div>
</div>
</div>
</section>
</body>

</html>


写回答

1回答

好帮手慕然然

2021-07-25

同学你好,代码实现没问题,继续加油,祝学习愉快!

0

0 学习 · 15276 问题

查看课程