百度首页制作

 

HTML:

<!DOCTYPE html>
<html lang="en">
<head>
	<title>Document</title>
		<meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="css/baidu.css"/>
		<script type="text/javascript" src="js/baidu.js"></script>
	</head>
 
	<body>
		<div class="top" >
			
		<a href="https://www.baidu.com"> 新闻</a>
		<a href="https://www.baidu.com">hao123</a>
		<a href="https://www.baidu.com">地图</a>
		<a href="https://www.baidu.com">视频</a>
		<a href="https://www.baidu.com">贴吧</a>
		<a href="https://www.baidu.com">学术</a>
		<a href="https://www.baidu.com">登录</a>
		<a  href="https://www.baidu.com" id="more1" onmouseover="x()" onmouseout="y()">设置 </a>
		<a href="https://www.baidu.com" id="more" >更多产品</a>
			
			<ul id="nav">
			<a href="#">搜索设置</a>
			<a href="#">高级搜索</a>
			<a href="#">关闭预测</a>
			<a href="#">隐私设置</a>
			</ul>	
		</div>
		
		<div class="middle"> 
		<div >
		<img src="img/baidu.png" alt="百度logo" width="235px" height="85px" id="baidu" />
		</div>
		<div>
			<img src="img/1.png" class="img"/>
		<input type="text" name="text" id="text" value="" />
		<button>百度一下</button>
		</div>
		</div>
		
		<div class="button">
			<img src="img/4.png"/>
			<p ><a href="#">把百度设为首页</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">关于百度</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">About Baiudu</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">关于百度</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">百度推广</a></p>
			@2018&nbsp;Baidu&nbsp;<a href="#">使用百度前必读</a>&nbsp;<a href="#">意见反馈</a>&nbsp;京ICP证030173号<img src="img/2.png" alt="" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;京公网安备11000000102001号<img src="img/3.png" alt="" />
			
		</div>
	</body>
</html>

CSS:

			.top{
				margin: 0px 0 80px 0;
				width: 460px;
				height: 30px;
				text-align: center;
			
				position: absolute;
				right:5px;
				top: 5px;
			}
			
			.top a{
				color:#585858;
				font-family:"微软雅黑";
				font-size: 0.85em;
				padding: 6px;
				font-weight:800 ;
			}
			
			#more{
				background-color: dodgerblue;
				text-decoration: none;
				color: white;	
				margin-left: 10px;
			}
			 #nav{
			 	display: none;
			 	position: absolute;
			 	top: 20px;
			 	left: 333px;
			 	padding:5px 0 5px 0;
			 	line-height: 23px;
			 	width: 60px;
			 	
			 	font-size: 14px;
			 	box-shadow: 0.5px 0.5px  3px 1px #C0C0C0;
			 }
			 #nav a{
			 	text-decoration: none;
			 }
		.middle{
				margin-left: auto;
				margin-right: auto;
				position: absolute;
				top:100px;
				left: 40px;
				text-align: center;
			}
		
		.middle img{
			padding: 0 0 35px 0;
		}
		 button{
			height: 41px;
			width: 100px;
			background-color: #3366FF;
			color: white;
			border: none;
			margin-left: -4px;
			padding-bottom: 3px;
			
		}
		
			.middle input{
				height: 35px;
				width: 550px;
			
			}
			body div +div{
				width: 1300px;
				height: 100px;
				margin: auto 0;
			}
			.middle input:before{
				content: url(img/1.png);
			}
			.middle div div{
				width: 1000px;
				height: 100px;
			}
		.button{
				
				text-align: center;
				padding: 180px 0 0 0;
				font-size: 10px;
				font-family: "微软雅黑";
				color: #C0C0C0;
				line-height: 5px;
				position: absolute;
				top: 250px;
				left: 40px;
			}
			div.button a{
				color: #C0C0C0;
			}
			.img{
				position: absolute;
				top:130px;
				left: 840px;
				cursor: pointer;
			}

 

JS:

				function x(){
				var more = document.getElementById("nav");
					more.style.display = 'block';
				}
				function y(){
					var more = document.getElementById("nav");
					more.style.display = 'none';
				}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

那就可爱多一点点

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值