百度首页的style.css文件也写出来
时间: 2024-05-27 19:12:17 浏览: 179
百度首页源码及素材文件.rar
由于百度首页的style.css文件是经常更新的,因此以下代码可能不完整或已经过时。以下是一个样本:
```css
/* 百度首页样式 */
/* 顶部导航栏 */
#s_top_wrap {
position: relative;
height: 37px;
font-size: 14px;
color: #000;
background-color: #fff;
border-bottom: 1px solid #ebebeb;
}
#s_top_wrap .s_top_wrap_inner {
width: 1190px;
margin: 0 auto;
height: 37px;
line-height: 37px;
position: relative;
}
#s_top_wrap .s_top_wrap_inner .s_icon {
display: inline-block;
width: 28px;
height: 28px;
vertical-align: middle;
margin-right: 10px;
background: url(https://www.baidu.com/img/bd_logo1.png) no-repeat;
background-size: 28px 28px;
}
#s_top_wrap .s_top_wrap_inner .s_username {
display: inline-block;
vertical-align: middle;
margin-right: 10px;
}
#s_top_wrap .s_top_wrap_inner .s_user_name_menu {
position: absolute;
top: 36px;
left: 0;
width: 100%;
background-color: #fff;
border-bottom: 1px solid #ebebeb;
z-index: 999;
display: none;
}
#s_top_wrap .s_top_wrap_inner .s_user_name_menu li {
padding: 5px 10px;
cursor: pointer;
}
#s_top_wrap .s_top_wrap_inner .s_user_name_menu li:hover {
background-color: #f5f5f5;
}
/* 搜索框 */
#form {
height: 40px;
position: relative;
}
#kw {
width: 546px;
height: 30px;
padding: 0 10px;
border: 1px solid #dfe0e2;
color: #333;
font-size: 16px;
outline: none;
border-radius: 2px;
}
#kw:focus {
border-color: #3385ff;
box-shadow: 0 0 2px rgba(51,133,255,.2);
}
#form .s_btn_wr {
position: absolute;
top: 0;
right: 0;
height: 40px;
}
#form .s_btn_wr .s_btn {
width: 64px;
height: 34px;
background: #3385ff;
border: none;
color: #fff;
font-size: 16px;
cursor: pointer;
border-radius: 2px;
outline: none;
}
#form .s_btn_wr .s_btn:hover {
background-color: #2f78ff;
}
/* 热搜 */
.hotsearch {
margin-top: 10px;
}
.hotsearch .title a {
font-size: 14px;
color: #000;
font-weight: bold;
margin-right: 5px;
}
.hotsearch .title .more {
font-size: 12px;
color: #666;
}
.hotsearch .list {
margin-top: 5px;
}
.hotsearch .list li {
display: inline-block;
margin-right: 10px;
margin-bottom: 5px;
}
.hotsearch .list li a {
font-size: 14px;
color: #666;
text-decoration: none;
transition: all .2s ease-in-out;
}
.hotsearch .list li a:hover {
color: #3385ff;
}
/* 底部信息 */
#s_bottom_wrap {
height: 25px;
font-size: 12px;
color: #999;
background-color: #f5f5f5;
border-top: 1px solid #ebebeb;
}
#s_bottom_wrap .s_bottom_wrap_inner {
width: 1190px;
margin: 0 auto;
height: 25px;
line-height: 25px;
}
#s_bottom_wrap .s_bottom_nav {
float: left;
margin-right: 10px;
}
#s_bottom_wrap .s_bottom_nav a {
font-size: 12px;
color: #999;
text-decoration: none;
margin-right: 10px;
}
#s_bottom_wrap .s_bottom_nav a:hover {
color: #3385ff;
}
#s_bottom_wrap .s_links {
float: right;
}
#s_bottom_wrap .s_links a {
font-size: 12px;
color: #999;
text-decoration: none;
margin-right: 10px;
}
#s_bottom_wrap .s_links a:hover {
color: #3385ff;
}
```
阅读全文