2019年12月20号作业
1、小结
在写代码的过程中有好多记不住,在听课的过程中感觉自己记住了,但还是眼高手低,还是得多动手,不管这些重不重要,都要自己写一遍。
2、上个完成图
3、上HTML代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>2019年12月20日作业</title>
<link rel="stylesheet" href="static/font/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="static/css/style.css">
</head>
<body>
<header>
<div class="he_top">
<div class="logo"><img src="static/images/logo.png" alt="PHP中文网LOGO" title="PHP中文网"/></div>
<div class="search">
<!-- <form action="demo.html" method="post" name="search">-->
<input type="text" name="key" id="key"><i class="fa fa-search"></i>
<!-- </form>-->
</div>
<div class="login">
<ul>
<li><i class="fa fa-address-book"></i></li>
<li><i class="fa fa-commenting"></i></li>
<li><i class="fa fa-cloud-upload"></i></li>
<li><i class="fa fa-search-plus"></i></li>
<li><i class="fa fa-user-o"></i></li>
<li><i class="fa fa-thumbs-o-up"></i></li>
</ul>
</div>
<div class="clear"></div>
</div>
<nav>
<div class="nav_wk">
<div class="nav_left">
<div class="nav_ico"><i class="fa fa-file-text-o"></i></div>
<div class="nav_text">
<li><a href="#">咨询</a></li>
<li><a href="#">学习</a></li>
</div>
</div>
<div class="nav_right">
<li class="nav_top">
<a href="#"> <span>器材</span></a>
<a href="#"><span>学员</span></a>
<a href="#"><span>大师</span></a>
<a href="#"> <span>实战</span></a>
</li>
<li class="nav_top">
<a href="#"> <span>大赛</span></a>
<a href="#"><span>影视</span></a>
<a href="#"><span>裤子</span></a>
<a href="#"><span>其他</span></a>
</li>
</div>
</div>
<div class="nav_wk">
<div class="nav_left">
<div class="nav_ico"><i class="fa fa-file-text-o"></i></div>
<div class="nav_text">
<li><a href="#">咨询</a></li>
<li><a href="#">学习</a></li>
</div>
</div>
<div class="nav_right">
<li class="nav_top">
<a href="#"> <span>器材</span></a>
<a href="#"><span>学员</span></a>
<a href="#"><span>大师</span></a>
<a href="#"> <span>实战</span></a>
</li>
<li class="nav_top">
<a href="#"> <span>大赛</span></a>
<a href="#"><span>影视</span></a>
<a href="#"><span>裤子</span></a>
<a href="#"><span>其他</span></a>
</li>
</div>
</div>
<div class="nav_wk">
<div class="nav_left">
<div class="nav_ico"><i class="fa fa-file-text-o"></i></div>
<div class="nav_text">
<li><a href="#">咨询</a></li>
<li><a href="#">学习</a></li>
</div>
</div>
<div class="nav_right">
<li class="nav_top">
<a href="#"> <span>器材</span></a>
<a href="#"><span>学员</span></a>
<a href="#"><span>大师</span></a>
<a href="#"> <span>实战</span></a>
</li>
<li class="nav_top">
<a href="#"> <span>大赛</span></a>
<a href="#"><span>影视</span></a>
<a href="#"><span>裤子</span></a>
<a href="#"><span>其他</span></a>
</li>
</div>
</div>
<div class="nav_wk">
<div class="nav_left">
<div class="nav_ico"><i class="fa fa-file-text-o"></i></div>
<div class="nav_text">
<li><a href="#">咨询</a></li>
<li><a href="#">学习</a></li>
</div>
</div>
<div class="nav_right">
<li class="nav_top">
<a href="#"> <span>器材</span></a>
<a href="#"><span>学员</span></a>
<a href="#"><span>大师</span></a>
<a href="#"> <span>实战</span></a>
</li>
<li class="nav_top">
<a href="#"> <span>大赛</span></a>
<a href="#"><span>影视</span></a>
<a href="#"><span>裤子</span></a>
<a href="#"><span>其他</span></a>
</li>
</div>
</div>
</nav>
<div class="clear"></div>
</header>
<div class="banner">
<div class="banner_left">
<img src="static/images/4.jpg" alt="相机AD"/>
</div>
<div class="banner_right">
<img src="static/images/banner-right.jpg" alt="这个是妹子">
</div>
<div class="clear"></div>
</div>
</body>
</html>
4、上CSS
@charset "utf-8";
*{
margin: 0;
padding: 0;
}
ul, li, a{
list-style: none;
}
.clear{
clear: both;
}
.he_top{
width: 1200px;
margin: 20px auto;
}
.logo{
float: left;
width: 500px;
height: 60px;
}
.logo img{
height: 60px;
}
.search{
float: left;
width: 400px;
height: 60px;
position: relative;
}
.search input{
width: 350px;
height: 30px;
border-radius: 10px;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
margin: auto;
}
.search i{
width:50px;
height:50px;
font-size: 25px;
color: #999999;
position: relative;
top:15px;
bottom: 0;
margin: auto;
right:10px;
float: right;
}
.login{
float: left;
width: 300px;
height: 60px;
}
.login li{
width: 50px;
height:50px;
float: left;
font-size: 30px;
color: #666666;
padding-top: 10px;
box-sizing: border-box;
}
nav{
width:1200px;
margin: 0 auto;
font-size: 14px;
}
.nav_wk{
float: left;
width:300px;
height:40px;
}
.nav_wk a{
color: #666666;
}
.nav_left,.nav_right{
float: left;
height: 40px;
width: 80px;
}
.nav_ico {
width: 40px;
height: 40px;
color: #ff0000;
font-size: 30px;
float: left;
}
.nav_text{
width: 38px;
height: 40px;
float: left;
border-right: 2px solid #d3d3d3;
}
.nav_text li{
list-style: none;
text-decoration:none;
}
.nav_text li a{
list-style: none;
text-decoration:none;
}
.nav_right{
width: 160px;
height: 40px;
}
.nav_top{
width: 160px;
height: 20px;
text-align: center;
}
.nav_top span{
display: block;
float: left;
width: 40px;
height: 20px;
}
.banner{
width: 1200px;
height: 320px;
margin: 20px auto;
}
.banner_left{
width: 898px;
height: 320px;
float: left;
}
.banner_right{
width: 295px;
height: 320px;
float: right;
}
6、写过一遍之后就会知道自己在哪方面没有记住,在去刷一遍视频!!!
PS 分享一下自己作业完成的方法,如果容易误导别人,请老师退回我删除!
1、首先是拆分这个HTML 无论多么复杂的HTML 拆开一个一个的小标签就可以完成了。