有欠缺的模拟百度网页
html部分
百度一下,你就知道
css部分
#div01{
width:100%;
height:40px;
line-height:40px;
}
a{
margin-right:20px;
text-decoration:none;
color:black;
}
a:visited{
color:blank;
}
a:hover{
color:#84C1FF;
}
#div02{
float:right;
width:150px;
height:40px;
}
#div03{
margin:auto;
width:250px;
height:98px;
background-image:url(img/baidu.jpg);
margin-top:50px;
}
#div04{
margin:auto;
width:700px;
height:40px;
}
input{
width:700px;
height:40px;
border-radius:10px;
border:2px solid grey;
}
input:focus{
border:2px solid #2894FF;
}
#i1{
background:url(img/百度一下.jpg) no-repeat right;
background-size:100px 40px;
}
#div07{
margin:auto;
width:80%;
height:1000px;
margin-top:70px;
}
#div05{
width:650px;
height:1000px;
float:left;
font-style:grey;
}
iframe{
width:100%;
height:95%;
border:0;
}
#div06{
width:320px;
height:500px;
float:right;
}
#a1{
font-size:15px;
font-family:arial;
}
ul a:hover{
text-decoration:underline;
}
ul li{
list-style:none;
}
#s1{
font-size:18px;
font-weight:bold;
}
span a:visited{
color:grey;
}
span a:hover{
color:#84C1FF;
}
#s2{
color:#FF2D2D;
}
#s3{
color:#FFA042;
}
#s4{
color:#FFE153;
}
#s5,#s6,#s7{
color:grey;
}
#div08{
width:50px;
height:50px;
background:url(img/d.jpg) no-repeat;
background-size:100%;
position:fixed;
bottom:50px;
right:50px;
}
#d1{
background-color:#84C1FF;
border-radius:10px;
width:80px;
height:25px;
font-size:15px;
border:solid 0.5px;
float:right;
margin-top:8px;
margin-right:30px;
}
#s8{
font-size:5px;
color:grey;
}
#s9{
background-color:#FF5809;
border-radius:5px;
color:white;
font-size:13px;
}
/*设置在鼠标悬浮时出现下拉框一样的选择框的样式*/
*{
padding: 0px;
margin: 0px;
}
ul{
list-style: none;
}
#menu{
width:70px;
height:20px;
margin:auto;
border:solid 0px;
position:relative;
background-color:white;
text-align:center;
top:-40px;
margin-right:10px;
}
#menu ul{
width:80px;
border:grey 1px solid;
position:absolute;
left:-1px;
top:30px;
border-radius:10px;
background-color:white;
font-size:13px;
display:none;
}
#content{
text-align:center;
}
#menu:hover ul{
display:block;
}
#menu ul li:hover{
background-color:grey;
}
图片得自己找,放在相应文件中就会打开