<!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>*学成在线首页</title> <link rel="stylesheet" href="style.css"> </head> <body> <!-- top区域 --> <div class="header w"> <!-- logo部分 --> <div class="logo"> <img src="images/logo.png" alt=""> </div> <!-- 导航栏部分 nav -- --> <div class="nav"> <ul> <li><a href="#">首页</a></li> <li><a href="#">课程</a></li> <li><a href="#">职业规划</a></li> </ul> </div> <!-- 搜索模块 --> <div class="search"> <input type="text" value="输入关键词"> <button></button> </div> <!-- 用户模块 --> <div class="user"> <img src="images/user.jpg" alt=""> qq-lilei </div> </div> <!-- banner区域 --> <div class="banner"> <!-- 版心 --> <div class="w"> <div class="subnav"> <ul> <li><a href="#">前端开发 <span> > </span></a></li> <li><a href="#">后端开发 <span> > </span></a></li> <li><a href="#">移动开发 <span> > </span></a></li> <li><a href="#">人工智能 <span> > </span></a></li> <li><a href="#">商业预测 <span> > </span></a></li> <li><a href="#">云计算&大数据 <span> > </span></a></li> <li><a href="#">区块链技术 <span> > </span></a></li> <li><a href="#">UI设计 <span> > </span></a></li> <li><a href="#">产品 <span> > </span></a></li> </ul> </div> <!-- course 课程表模块 --> <div class="course"> <h2>我的课程表</h2> <div class="bd"> <ul> <li> <h4>继续学习 程序语言设计</h4> <p>正在学习-使用对象</p> </li> <li> <h4>继续学习 程序语言设计</h4> <p>正在学习-使用对象</p> </li> <li> <h4>继续学习 程序语言设计</h4> <p>正在学习-使用对象</p> </li> </ul> <a href="#" class="more">全部课程</a> </div> </div> </div> </div> <!-- 精品推荐模块 --> <div class="goods w"> <h3>精品推荐</h3> <ul class="item"> <li><a href="#">JQuery</a></li> <li><a href="#">Spark</a></li> <li><a href="#">MySQL</a></li> <li><a href="#">JavaWeb</a></li> <li><a href="#">Vue</a></li> </ul> <a href="#" class="mod">修改兴趣</a> </div> <!-- 4.box 核心内容区域 --> <div class="box w"> <div class="box-hd"> <h3>精品推荐</h3> <a href="#">查看全部</a> </div> <div class="box-bd"> <ul class="clearfix"> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> <li> <img src="images/pic01.png" alt=""> <h4>Think PHP 5.0 博客系统实战项目演练</h4> <div class="info"> <span>高级</span> . 1125人在学习 </div> </li> </ul> </div> </div> <!-- 5.footer 模块制作 --> <div class="footer"> <div class="w"> <div class="copyright"> <img src="images/logo.png" alt=""> <p>学成在线致力于普及中国最好的教育,它与中国一流大学和机构合作提供在线课程. <br> © 2017年XTCG Inc.保留所有权利. -沪ICP备15025210号 </p> <a href="#" class="app">下载APP</a> </div> <div class="links"> <dl> <dt>关于学成网</dt> <dd><a href="#">关于</a></dd> <dd><a href="#">管理团队</a></dd> <dd><a href="#">工作机会</a></dd> <dd><a href="#">客户服务</a></dd> <dd><a href="#">帮助</a></dd> </dl> <dl> <dt>关于学成网</dt> <dd><a href="#">关于</a></dd> <dd><a href="#">管理团队</a></dd> <dd><a href="#">工作机会</a></dd> <dd><a href="#">客户服务</a></dd> <dd><a href="#">帮助</a></dd> </dl> <dl> <dt>关于学成网</dt> <dd><a href="#">关于</a></dd> <dd><a href="#">管理团队</a></dd> <dd><a href="#">工作机会</a></dd> <dd><a href="#">客户服务</a></dd> <dd><a href="#">帮助</a></dd> </dl> </div> </div> </div> <!-- <div class="l"> <img src="images/car.png" alt=""> </div> --> </body> </html>
* { margin: 0; padding: 0; } .w { width: 1200px; margin: auto; } body { background-color: #f3f5f7; /* height: 3000px; */ } li { list-style: none; } a { text-decoration: none; } .clearfix:before,.clearfix:after { content:""; display: table; } .clearfix:after { clear: both; } .clearfix { *zoom:1; } .header { height: 42px; /* background-color: pink; */ /* 注意此处会层叠w里的margin: ; */ margin: 30px auto; } .logo { float: left; width: 198px; height: 42px; /* background-color: purple; */ } .nav { float: left; margin-left: 60px; } .nav ul li { float: left; margin: 0 15px; } .nav ul li a { display: block; height: 42px; padding: 0 10px; line-height: 42px; font-style: 18px; color: #050505; } .nav ul li a:hover { border-bottom: 2px solid #00a2f7; color: #00a2f7; } /* search 搜搜模块 */ .search { float: left; width: 412px; height: 42px; margin-left: 70px; } .search input { float: left; width: 345px; height: 40px; border: 1px solid #00a2f7; border-right: 0px; color: #bfbfbf; font-size: 14px; padding-left: 15px; } .search button { float: left; width: 50px; height: 42px; /* 按钮button有个边框需要我们手动去掉 */ border: 0px; background: url(images/btn.jpg); } .user { float: right; line-height: 42px; margin-right: 30px; font-size: 14px; color: #666; } .banner { height: 421px; background-color: #1c036c; } .banner .w { height: 421px; background: url(images/banner2.png) no-repeat top center; } .subnav { float: left; width: 190px; height: 421px; background: rgba(0, 0, 0, .3); } .subnav ul li { height: 45px; line-height: 45px; padding: 0 20px; } .subnav ul li a { font-size: 14px; color: #fff; } .subnav ul li a span { float: right; } .subnav ul li a:hover { color: #00a4ff; } .course { float: right; width: 230px; height: 300px; background-color: #fff; margin-top: 50px; } .course h2 { height: 48px; background-color: #99cfed; text-align: center; line-height: 48px; font-size: 18px; color: #fff; } .bd { padding: 0 20px; } .bd ul li { padding: 14px 0; border-bottom: 1px solid #ccc; } .bd ul li h4 { font-size: 16px; color: #4e4e4e; } .bd ul li p { font-size: 12px; color: #a5a5a5; } .bd .more { display: block; height: 38px; border: 1px solid #289fe3; margin-top: 5px; text-align: center; line-height: 38px; color: #289fe3 ; font-size: 16px; font-weight: 700; } /* 精品推荐模块 */ .goods { height: 60px; background-color: #fff; margin-top: 10px; box-shadow: 0 2px 3px 3px rgba(0, 0, 0, .1); /* 行高会继承 */ line-height: 60px; } .goods h3 { float: left; margin-left: 30px; font-size: 16px; color: #00a4ff; } .goods .item { float: left; margin-left: 30px; } .goods .item li { float: left; } .goods .item li a { padding: 0 30px; border-left: 1px solid #ccc; font-size: 16px; color: #050505; } .mod { float: right; margin-right: 30px; font-size: 14px; color: #00a4ff; } .box { margin-top: 30px; } .box-hd { height: 45px; } .box-hd h3 { float: left; font-size: 20px; color: #494949; } .box-hd a { float: right; font-size: 12px; color: #a5a5a5; margin-top: 10px; margin-right: 30px; } /* 把li 的父亲ul 修改的足够宽 一行能撞开5个盒子就不会换行了 */ .box-bd ul { width: 1225px; } .box-bd ul li { float: left; width: 228px; height: 270px; background-color: #fff; margin-right: 15px; margin-bottom: 15px; } .box-bd ul li img { width: 100%; } .box-bd ul li h4 { margin: 20px 20px 20px 25px; font-size: 14px; color: #050505; font-weight: 400; } .box-bd .info { margin: 0 20px 0 25px; font-size: 12px; color: #999; } .box-bd .info span { color: #ff7c2d; } .footer { height: 415px; background-color: #fff; } .footer .w { padding-top: 35px; } .copyright { float: left; } .copyright p { font-size: 12px; color: #666; margin: 20px 0 15px 0; } .copyright .app { display: block; width: 118px; height: 33px; border: 1px solid #00a4ff; text-align: center; line-height: 33px; color: #00a4ff; font-style: 16px; } .links { float: right; } .links dl { float: left; margin-left: 100px; } .links dl dt { margin-bottom: 5px; font-size: 16px; color: #333; } .links dl dd a { color: #333; font-size: 12px; } /* .l { position: fixed; top: 200px; left: 30px; } .l img { width: 60%; } */