老师请检查
来源:3-17 编程练习
wsc6016922
2020-09-10 11:10:17
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style> /* 在此处补充代码*/ * { padding: 0; margin: 0; list-style: none; } header { width: 100%; height: 100px; background: #000; display: flex; justify-content: space-around; align-items: center; } .nav { color: #fff; display: flex; justify-content: space-around; width: 400px; } .nav li { font-size: 24px; } .login { width: 250px; display: flex; justify-content: space-around; } .login input { width: 70px; height: 30px; background: orange; border-radius: 5px; color: #fff; border: 0; } section { display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center; width: 100%; height: 450px; } .section { width: 650px; height: 200px; background: rgb(147, 205, 209); border-radius: 10px; display: flex; align-items: center; justify-content: space-around; } .box { display: flex; flex-direction: column; font-size: 20px; height: 100%; justify-content: space-around; } .shopping { display: flex; justify-content: center; align-items: center; width: 100px; height: 40px; color: #fff; background: orange; border-radius: 6px; } </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、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> </body> </html>
2回答
同学你好,代码布局以及实现效果很棒。继续加油,祝学习愉快!
好帮手慕星星
2020-09-10