导航部分文字链接,鼠标触碰变颜色,除百度logo引用图片外,其它均代码编写。注释部分是一开始用的百度一下截图做的按钮,后来用div填充颜色写了一个按钮。效果图如下。

HTML代码如下:

 <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>百度一下,你就知道</title>
<link href="css/homework.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="nav">
<ul>
<li><div id="more"><a href="#"><font color="white">更多产品</font></a></div></li>
<li class="b"><a href="#">设置</a></li>
<li class="b"><a href="#">登录</a></li>
<li class="hei"><a href="#">学术</a></li>
<li class="hei"><a href="#">贴吧</a></li>
<li class="hei"><a href="#">视频</a></li>
<li class="hei"><a href="#">地图</a></li>
<li class="hei"><a href="#">hao123</a></li>
<li class="hei"><a href="#">新闻</a></li>
</ul>
<div id="logo"></div>
<div id="search">
<div id="l">
<div id="kuang">
<input id="camera" type="text"
style="width: 600px; height: 32px; border: #5f9dfa 1px solid;">
</div>
</div>
<div id="r">
<!-- <input id="an" type="image" src="data:images/baiduan.png"> -->
<font color="white">百度一下</font>
</div>
</div>
</body>
</html>

CSS代码如下:

 #nav .hei a:hover{
color:blue;
}
#nav .b a:hover{
color:blue;
}
li #more{
width:60px;
height:25px;
background-color:#3385ff;
font-size:13px;
line-height:25px;
text-align: center;
}
li #more a{
text-decoration: none;
font-color:write;
}
.hei{
font-color:black;
}
.b{
font-color:black;
}
#nav{
width:100%;
height:30px;
//font-color:black;
}
a:link{
color:black;
}
li{
list-style:none;
width:60px;
float:right;
font-size:13px;
font-color:black;
line-height:30px;
}
.hei{
font-weight:bolder;
} #logo{
width:100%;
height:200px;
background:url("../images/baidulogo.png") no-repeat 50%,50%;
}
#search{
width:100%;
height:300px;
float:left;
}
#l{
width:66%;
height:300px;
float:left;
}
#kuang{
float:right;
width:600px;
height:32px;
float:right;
}
#camera{
background:url("../images/camera.png") no-repeat 100%,100%;
}
#r{
width:34%;
height:300px;
float:left;
}
/* #an{
float:left;
} */
#r{
width:101px;
height:36px;
background-color:#3385ff;
font-size:14px;
line-height:37px;
text-align: center;
}

最新文章

  1. ARCGIS SDE空间化处理
  2. 关于不断刷新界面jsp+ajax
  3. Java学习1 - java 历史
  4. 百度定位API报错:leaked ServiceConnection com.baidu.location.LocationClient$1@426122f0
  5. devices-list
  6. 处理海量数据的高级排序之——快速排序(C++)
  7. 如何在ios 系统 中抓包??
  8. BW知识点总结及面试要点
  9. Hyper-V中安装CentOS分辨率修改
  10. sublime text 自动保存
  11. python核心编程-第五章-习题
  12. QT基本数据类型(以前没见过qintptr和qlonglong)
  13. iOS开发——NSArray中的字符串排序
  14. Dora.Interception,为.NET Core度身打造的AOP框架 [1]:更加简练的编程体验
  15. 【国庆】记一次mysqld_safe引发mysql进程故障
  16. Django的版本选择
  17. 绛河 初识WCF4
  18. nodejs记录1——async函数
  19. Codeforces709
  20. [How to] HBase的bulkload使用方法

热门文章

  1. Appium——元素定位
  2. Spring Boot2.0之多数据源事务管理
  3. vs2010 windows service 项目不能引用类库项目
  4. laravel基础课程---11、lavarel的ajax操作(ajax优劣势是什么)
  5. jenkins maven tomcat做持续集成
  6. 2018.3.3 How too much fructose may cause liver damage
  7. C/C++语法知识点汇总
  8. 「HNOI2008」「LuoguP3197」越狱(数论
  9. KCF+Opencv3.0+Cmake+Win10 测试
  10. this在方法赋值过程中无法保持(隐式丢失)