第一次写出页面,虽然是跟着老师的教学写出来的,但是心里很开心.
盒子布局比较清晰了,但是命名,写法还很不规范,写网页速度很慢,会有各种各样的小问题,需要培养好写网页的好习惯,善于应用检查工具,要多加练习,打字速度也还要提高.
<html lang="en">
<head>
<meta charset="UTF-8">
<title>学成在线--不是所有的网站都叫学成在线title>
<link rel="stylesheet" href="style.css">
head>
<body>
<div class="header w">
<div class="logo">
<img src="images/logo.png" alt="">
div>
<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" >
qq-leishui
div>
div>
<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>
<div class="course">
<div class="course-hd">我的课程表div>
<div class="course-bd">
<ul>
<li>
<h4>继续学习 程序语言设计h4>
<p>正在学习-使用对象p>
li>
<li>
<h4>继续学习 程序语言设计h4>
<p>正在学习-使用对象p>
li>
<li>
<h4>继续学习 程序语言设计h4>
<p>正在学习-使用对象p>
li>
ul>
<a href="#" class="all">全部课程a>
div>
div>
div>
div>
<div class="goods w">
<h3>精品推荐h3>
<div class="goods-item">
| <a href="#">JQuerya>
| <a href="#">Sparka>
| <a href="#">MySQLa>
| <a href="#">JavaWeba>
| <a href="#">MySQLa>
| <a href="#">JavaWeba>
div>
<div class="mod">修改兴趣div>
div>
<div class="box w">
<div class="box-hd">
<h3>精品推荐h3>
<a href="#">查看全部a>
div>
<div class="box-bd clearfix">
<ul>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
ul>
div>
div>
<div class="box w">
<div class="box-hd">
<h3>精品推荐h3>
<a href="#">查看全部a>
div>
<div class="box-bd clearfix">
<ul>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
<li>
<img src="images/pic.jpg" >
<h4>Think PHP 5.0 博客系统实战项目演习h4>
<p><span>高级span> • 1125人在学习p>
li>
ul>
div>
div>
<div class="footer">
<div class="w">
<div class="copyright">
<img src="images/logo.png" >
<p>学成在线致力于普及中国最好的教育它与中国一流大学和机构合作提供在线课程。<br>
© 2017年XTCG Inc.保留所有权利。-沪ICP备15025210号p>
<a href="#" class="app">下载APPa>
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>
dl>
div>
div>
div>
body>
html>
* {
margin: 0;
padding: 0;
}
li {
list-style:none;
}
button {
border: none;
}
a {
text-decoration: none;
}
body {
background-color: #F4F5F9;
}
.clearfix:before,.clearfix:after {
content:"";
display:table;
}
.clearfix:after {
clear:both;
}
.clearfix {
*zoom:1;
}
.w {
width: 1200px;
margin: 0 auto;
}
/*header*/
.header {
height: 42px;
margin: 30px auto;
}
.logo {
float: left;
margin-right: 60px;
}
.nav {
float: left;
}
.nav ul li {
float: left;
}
.nav ul li a {
display: block;
height: 40px;
line-height: 40px;
padding: 0 10px;
margin-right: 20px;
color: #050505;
font-size: 18px;
text-decoration: none;
}
.nav ul li a:hover {
border-bottom: 2px solid #0598F5;
}
.search {
float: left;
margin-left: 70px;
}
.search input {
float: left;
width: 340px;
height: 38px;
border: 1px solid #0598F5;
padding-left: 20px;
color: #ccc;
}
.search button {
float: left;
width: 50px;
height: 40px;
background:url(images/btn.png);
}
.user {
float: left;
height: 40px;
line-height: 40px;
margin-left: 30px;
font-size: 14px;
color: #666;
}
.user img {
float: left;
margin: 5px 5px 0 0;
}
/*banner*/
.banner {
height: 420px;
background: #1C036B url(images/banner2.jpg) no-repeat top center;
}
.subnav {
float: left;
width: 150px;
height: 420px;
padding: 0 20px;
background: rgba(0,0,0,.3);
}
.subnav span {
float: right;
}
.subnav li {
height: 45px;
line-height: 45px;
}
.subnav li a {
font-size: 14px;
color: #fff;
}
.subnav li a:hover {
color: #00ADE2;
}
.course {
float: right;
width: 228px;
height: 300px;
margin-top: 50px;
background-color: #fff;
}
.course-hd {
height: 48px;
line-height: 48px;
text-align: center;
font-size: 18px;
color: #fff;
font-weight: 700;
background-color: #9BCEEB;
}
.course-bd {
padding: 0 15px;
}
.course-bd li {
height: 50px;
border-bottom: 1px solid #ccc;
margin-top: 10px;
}
.course-bd li h4 {
font-size: 14px;
color: #4e4e4e;
}
.course-bd li p {
font-size: 12px;
color: #a5a5a5;
}
.course ul {
padding-top: 10px;
}
.all {
display: block;
height: 38px;
line-height: 38px;
text-align: center;
border: 1px solid #00a4ff;
color: #00a4ff;
font-size: 16px;
}
.all:hover {
color: #fff;
background-color: #00a4ff;
}
/*goods*/
.goods {
height: 60px;
line-height: 60px;
margin-top: 10px;
box-shadow: 2px 2px 2px rgba(0,0,0,.2);
}
.goods h3 {
float: left;
margin: 0 34px;
font-size: 16px;
color: #02A8F2;
}
.goods-item {
float: left;
color: #bfbfbf;
}
.goods-item a {
margin: 0 30px;
color: #050505;
font-size: 16px;
}
.mod {
float: right;
margin-right: 30px;
font-size: 14px;
color: #02A8F2;
}
/*box*/
.box {
margin-top: 15px;
}
.box-hd {
height: 60px;
line-height: 60px;
}
.box-hd h3 {
float: left;
font-size: 20px;
color: #404143;
font-weight: 400;
}
.box-hd a {
float: right;
margin-right: 30px;
font-size: 12px;
color: #a5a5a5;
}
.box-bd {
width: 1215px;
}
.box-bd li {
float: left;
width: 228px;
height: 270px;
margin-right: 15px;
margin-bottom:15px;
box-shadow: 2px 2px 2px rgba(0,0,0,.3);
}
.box-bd li img {
width: 100%;
}
.box-bd li h4 {
margin: 20px;
font-size: 14px;
color: #050505;
font-weight: 400;
}
.box-bd li p {
margin: 0 20px;
font-size: 12px;
color: #999;
}
.box-bd p span {
color: orange;
}
/*footer*/
.footer {
height: 385px;
padding-top: 30px;
background-color: #fff;
}
.copyright {
float: left;
}
.copyright p {
margin: 20px 0 15px 0;
font-size: 12px;
color: #666;
}
.app {
display: block;
width: 118px;
height: 34px;
line-height: 34px;
text-align: center;
border: 1px solid #00a4ff;
font-size: 16px;
color: #00a4ff;
}
.app:hover {
color: #fff;
background-color: #00a4ff;
}
.links {
float: right;
}
.links dl {
float: left;
margin-left: 100px;
}
.links dt {
height: 35px;
font-size: 16px;
}
.links dd a {
font-size: 12px;
color: #000;
}
.links dd a:hover {
color: #00a4ff;
}