<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<style type="text/css">
*/*全局定义*/
{
margin:0;
padding:0;
overflow-x:hidden;/*隐藏横向滚动条*/
}
.top/*页面顶部div*/
{
height:57px;/*设置顶部div高度*/
width:1600px;/*设置顶部div宽度*/
background-color:white;/*设置背景颜色*/
border-bottom:solid 1px lightgray;/*设置边框*/
position:fixed;/*使div保持在页面顶端*/
overflow-x:hidden;/*隐藏横向滚动条*/
overflow-y:hidden;/*隐藏纵向滚动条*/
}
.search/*搜索框*/
{
width:530px;/*设置宽度*/
height:35px;/*设置高度*/
float:left;/*浮动,横向排列*/
margin-left:0px;/*调整位置,下同*/
margin-top:10px;
padding-left:10px;/*初始位置距离左边框距离*/
font-size:20px;/*设置字体大小*/
border-top:solid 1px gray;/*设置边框属性,下同*/
border-left:solid 1px gray;
border-bottom:solid 1px gray;
}
.baidu_search_button/*蓝色百度一下*/
{
float:left;/*浮动,横向排列*/
width:130px;/*设置宽度*/
height:37px;/*设置高度*/
font-size:14px;/*设置字体大小*/
color:white;/*设置字体颜色*/
background-color:rgb(49, 126, 243);/*设置背景颜色*/
margin-top:10px;/*调整位置,下同*/
margin-left:0px;
border:none;/*取消边框*/
}
.baidu_logo/*百度logo*/
{
height:55px;/*设置高度*/
width:120px;/*设置宽度*/
margin-left:0px;/*调整位置,下同*/
margin-top:0px;
float:left;/*浮动,横向排列*/
}
.top ul li/*顶部右侧超链接*/
{
list-style:none;/*取消圆点*/
float:left;/*浮动,横向排列*/
font-size:12px;/*设置字体大小*/
margin-left:15px;/*调整位置,下同*/
margin-top: 20px;
}
.top ul li a/*顶部右侧超链接*/
{
color:black;/*色湖之字体颜色*/
}
.top ul/*顶部右侧超链接*/
{
margin-left:540px;/*调整位置*/
float:left;/*浮动,横向排列*/
}
/*------------------------------------------------------------------------*/
.top_second/*网页,资讯等搜索栏*/
{
width:1600px;/*设置div宽度*/
height:40px;/*设置div高度*/
background-color:rgb(248, 248, 248);/*设置背景颜色*/
margin-top:57px;/*调整位置*/
}
.top_second a/*色湖之超链接*/
{
text-decoration:none;/*取消下划线*/
display:inline-block;/*设置成行内块,从而调整宽度和高度*/
font-size:14px;/*设置字体大小*/
color:gray;/*设置字体颜色*/
float:left;/*浮动,横向排列*/
width:54px;/*设置宽度*/
height:40px;/*设置高度*/
text-align:center;/*是字体位于正中央*/
line-height:40px;/*上下调整字体位置*/
}
.top_second_the_first/*原网页不是超链接,是字体,所以可以设置下边框*/
{
margin-left:120px;/*调整位置*/
font-weight:bold;/*加粗字体*//*新!!!!!!!!*/
color:black !important;/*调整优先级,使网页两个字呈现黑色*//*新!!!!!!*/
}
.top_second a:hover/*伪类选择器*/
{
color:#323232;/*设置颜色为淡灰色*/
}
/*------------------------------------------------------------------------*/
.top_third/*找到多少结果那一行*/
{
width:538px;/*设置宽度*/
height:42px;/*设置高度*/
margin:0 0 0 121px;/*调整位置,顺序:上右下左*//*新!!!!!!!!*/
line-height:42px;/*调整文字高度*/
font-size:12px;/*设置字体大小*/
color:#999;/*设置字体颜色*/
}
.search_tool/*小漏斗+文字*/
{
cursor:pointer;/*鼠标移动上去变成小手*//*新!!!!!!!!*/
color:#666;/*设置文字颜色*/
float:right;/*浮动,横向排列,贴近右侧*//*新!!!!!!!!*/
}
.xuebitu_louDou/*小漏斗*/
{
background-image:url("imgs/xuebitu.gif");/*设置背景图片*/
background-position:-864px -144px;/*调整雪碧图位置*/
display:inline-block;/*设置行内快,从而调整大小*/
width:14px;/*设置宽度*/
height:14px;/*设置高度*/
vertical-align:center;/*使图片和文字平行*//*新!!!!!!!!*/
}
/*------------------------------------------------------------------------*/
.largest_div/*大背景*/
{
width:540px;/*设置宽度*/
padding-left:121px;/*调整内距,下同*/
padding-top:5px;
float:left;/*浮动,横向排列*/
}
h3/*标题*/
{
font-size:medium;/*设置标题字体大小*/
line-height:1.54;/*设置文字高度*//*单位是px么????????*/
font-weight:400;/*设置文字粗细*//*新!!!!!!!!!!!!!!*/
margin-bottom:5px;/*调整位置*/
}
.with_picture_first_a/*标题超链接*/
{
color:blue;/*设置颜色*/
}
.without_picture_first_a/*没图片的,代码意思同有图片的*/
{
color:blue;
}
em/*强调标签*//*新!!!!!!!!*/
{
color:red;/*设置强调字符颜色*/
font-style:normal;/*取消斜体,em标签默认斜体*/
}
.with_picture/*有图片的div*/
{
margin-bottom: 14px;/*调整位置*/
border-collapse:collapse;/*为表格设置合并边框模型*//*????????*/
width:538px;/*设置宽度*/
font-size:13px;/*设置字体大小*/
line-height:1.54;/*设置文字高度*//*单位是px么????????*/
}
.without_picture/*无图片的,代码意思同有图片的*/
{
margin-bottom: 14px;
border-collapse:collapse;
width:538px;
font-size:13px;
line-height:1.54;
}
.images01/*图片*/
{
width:121px/*设置图片宽度*/;
height:75px;/*设置图片高度*/
border:none;/*取消边框*/
float:left;/*浮动,横向排列*/
border-right:solid 20px white;/*设置右侧边框,与文字隔开一段距离*/
}
.with_picture div p/*文字部分*/
{
word-break: break-all;/*换行*/
font-size:13px;/*设置字体大小*/
line-height:1.54;/*调整位置,下同*/
margin-left:10px;
}
.without_picture p/*无图片的,代码意思同有图片的*/
{
word-break: break-all;
font-size:13px;
line-height:1.54;
margin-left:0px;
width:410px;
}
.with_picture_second_a/*文字下的绿色网站*/
{
color:green;/*设置网站颜色*/
}
.without_picture_second_a/*无图片的,代码意思同有图片的*/
{
color:green;
}
.with_picture_second_a_xuebitu/*雪碧图,绿色,向下,小三角*/
{
width:14px;/*设置宽度*/
height:14px;/*设置高度*/
background-image:url("imgs/xuebitu.gif");/*设置背景图片*/
background-position:-744px -144px;/*调整位置,选择想要的部分*/
display:inline-block;/*设置成行内快*/
cursor:pointer;/*鼠标移上去之后变成小手*/
vertical-align:center;/*让图片和文字平行*/
margin-left:2px;/*调整位置*/
}
.without_picture_second_a_xuebitu/*无图片的,代码意思同有图片的*/
{
width:14px;
height:14px;
background-image:url("imgs/xuebitu.gif");
background-position:-744px -144px;
display:inline-block;
cursor:pointer;
vertical-align:center;
margin-left:2px;
}
.baiDuKuaiZhao/*百度快照,灰色超链接*/
{
color:#666;/*设置颜色*/
text-decoration:underline;/*带下划线*/
font-size:13px;/*设置文字大小*/
line-height:1.54;/*调整位置*/
}
</style>
</head>
<body>
<div class="top">
<img class="baidu_logo" src="imgs/baidulogo.png" alt="baidu_logo">
<input class="search" type="text">
<button class="baidu_search_button" type="submit">百度一下</button>
<ul>
<li><a href="#">百度首页</a></li>
<li><a href="#">消息</a></li>
<li><a href="#">设置</a></li>
<li><a href="#">王某</a></li>
</ul>
</div>
<!-- --------------------------------------------------------------------- -->
<div class="top_second">
<a class="top_second_the_first" href="#">网页</a>
<a href="#">资讯</a>
<a href="#">贴吧</a>
<a href="#">知道</a>
<a href="#">视频</a>
<a href="#">音乐</a>
<a href="#">图片</a>
<a href="#">地图</a>
<a href="#">文库</a>
<a href="#">更多>></a>
</div>
<!-- --------------------------------------------------------------------- -->
<div class="top_third">
<div class="search_tool">
<i class="xuebitu_louDou"></i>
搜索工具
</div>
<span>百度为您找到相关结果约96,900个</span>
</div>
<!-- --------------------------------------------------------------------- -->
<div class="largest_div">
<div class="with_picture">
<h3><a class="with_picture_first_a" href="#"><em>html</em>相对<em>定位</em>和绝对<em>定位</em>-CSS<em>定位</em></a></h3>
<img class="images01" src="imgs/2018_11_18_01.jpg" height="1121" width="1992" alt="">
<p>2018年4月9日 - 也就是说,普通流中的元素的位置由元素在 (X)HTML 中的位置决定。 块级框从...</p>
<a class="with_picture_second_a" href="#">https://www.cnblogs.com/feiche... </a>
<i class="with_picture_second_a_xuebitu"></i>
-
<a class="baiDuKuaiZhao" href="#">百度快照</a>
</div>
<div class="with_picture">
<h3><a class="with_picture_first_a" href="#"><em>html</em>相对<em>定位</em>和绝对<em>定位</em>-CSS<em>定位</em></a></h3>
<img class="images01" src="imgs/2018_11_18_01.jpg" height="1121" width="1992" alt="">
<p>2018年4月9日 - 也就是说,普通流中的元素的位置由元素在 (X)HTML 中的位置决定。 块级框从...</p>
<a class="with_picture_second_a" href="#">https://www.cnblogs.com/feiche... </a>
<i class="with_picture_second_a_xuebitu"></i>
-
<a class="baiDuKuaiZhao" href="#">百度快照</a>
</div>
<div class="without_picture">
<h3><a class="without_picture_first_a" href="#"><em>html</em>相对<em>定位</em>和绝对<em>定位</em>-CSS<em>定位</em></a></h3>
<p>2018年2月12日 - fixed固定定位和absolute绝对定位比较类似,它们都能够让元素产生位移,并且脱离文档流。关于absolute绝对定位可以参阅CSS absolute绝对定位一章节。</p>
<a class="with_picture_second_a" href="#">https://www.cnblogs.com/feiche... </a>
<i class="with_picture_second_a_xuebitu"></i>
-
<a class="baiDuKuaiZhao" href="#">百度快照</a>
</div>
<div class="without_picture">
<h3><a class="without_picture_first_a" href="#"><em>html</em>相对<em>定位</em>和绝对<em>定位</em>-CSS<em>定位</em></a></h3>
<p>2018年2月12日 - fixed固定定位和absolute绝对定位比较类似,它们都能够让元素产生位移,并且脱离文档流。关于absolute绝对定位可以参阅CSS absolute绝对定位一章节。</p>
<a class="with_picture_second_a" href="#">https://www.cnblogs.com/feiche... </a>
<i class="with_picture_second_a_xuebitu"></i>
-
<a class="baiDuKuaiZhao" href="#">百度快照</a>
</div>
<div class="with_picture">
<h3><a class="with_picture_first_a" href="#"><em>html</em>相对<em>定位</em>和绝对<em>定位</em>-CSS<em>定位</em></a></h3>
<img class="images01" src="imgs/2018_11_18_01.jpg" height="1121" width="1992" alt="">
<p>2018年4月9日 - 也就是说,普通流中的元素的位置由元素在 (X)HTML 中的位置决定。 块级框从...</p>
<a class="with_picture_second_a" href="#">https://www.cnblogs.com/feiche... </a>
<i class="with_picture_second_a_xuebitu"></i>
-
<a class="baiDuKuaiZhao" href="#">百度快照</a>
</div>
<div class="with_picture">
<h3><a class="with_picture_first_a" href="#"><em>html</em>相对<em>定位</em>和绝对<em>定位</em>-CSS<em>定位</em></a></h3>
<img class="images01" src="imgs/2018_11_18_01.jpg" height="1121" width="1992" alt="">
<p>2018年4月9日 - 也就是说,普通流中的元素的位置由元素在 (X)HTML 中的位置决定。 块级框从...</p>
<a class="with_picture_second_a" href="#">https://www.cnblogs.com/feiche... </a>
<i class="with_picture_second_a_xuebitu"></i>
-
<a class="baiDuKuaiZhao" href="#">百度快照</a>
</div>
<div class="without_picture">
<h3><a class="without_picture_first_a" href="#"><em>html</em>相对<em>定位</em>和绝对<em>定位</em>-CSS<em>定位</em></a></h3>
<p>2018年2月12日 - fixed固定定位和absolute绝对定位比较类似,它们都能够让元素产生位移,并且脱离文档流。关于absolute绝对定位可以参阅CSS absolute绝对定位一章节。</p>
<a class="with_picture_second_a" href="#">https://www.cnblogs.com/feiche... </a>
<i class="with_picture_second_a_xuebitu"></i>
-
<a class="baiDuKuaiZhao" href="#">百度快照</a>
</div>
<div class="without_picture">
<h3><a class="without_picture_first_a" href="#"><em>html</em>相对<em>定位</em>和绝对<em>定位</em>-CSS<em>定位</em></a></h3>
<p>2018年2月12日 - fixed固定定位和absolute绝对定位比较类似,它们都能够让元素产生位移,并且脱离文档流。关于absolute绝对定位可以参阅CSS absolute绝对定位一章节。</p>
<a class="with_picture_second_a" href="#">https://www.cnblogs.com/feiche... </a>
<i class="with_picture_second_a_xuebitu"></i>
-
<a class="baiDuKuaiZhao" href="#">百度快照</a>
</div>
</body>
</html>