效果图
源码
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>百度一下,你就知道</title>
<style type="text/css">
a {
color: black;
}
a:link {
text-decoration: none;
}
a:hover {
color: #4e6ef2;
text-decoration: none;
}
.left {
line-height: 22px;
font-size: 13px;
text-align: left;
margin: 18px 0 18px 0;
margin-left: 30px;
}
.right {
position: absolute;
right: 0px;
width: 150px;
}
.dropdown {
text-align: center;
position: relative;
display: inline-block;
padding-right: 23px;
}
.dropdown-content {
list-style: none;
position: absolute;
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 61px;
padding: 12px 16px;
line-height: 30px;
z-index: 10px;
}
.dropdown:hover .dropdown-content {
display: block;
}
.box {
width: 650px;
height: 0px;
margin: 200px auto 100px;
position: relative;
}
input {
outline: none;
border: 2px solid #a7aab5;
height: 45px;
width: 550px;
box-sizing: border-box;
text-indent: 6px;
font-size: 16px;
border-radius: 10px 0 0 10px;
}
.gd {
color: #fff;
background: #38f;
line-height: 24px;
font-size: 13px;
text-align: center;
border-bottom: 1px solid #38f;
margin-left: 7px;
margin-top: 10px;
}
.hot-title {
width: 654px;
position: relative;
margin: 45px auto 0;
}
.baiduhot div {
width: 50%;
overflow: hidden;
float: left;
line-height: 32px;
}
.baiduyixia {
font-size: 17px;
}
.title-content-title {
margin: 10px 0 0;
float: left;
height: 32px;
line-height: 32px;
}
.title-content-title1 {
margin: 10px 0 0;
margin-left: 90px;
float: left;
height: 32px;
line-height: 32px;
}
.right-hot {
float: right;
line-height: 20px;
}
.top1 {
color: #fe2d46;
}
.top2 {
color: #f60;
}
.top3 {
color: #faa90e;
}
.other-top {
background: 0 0;
color: #9195a3;
}
button {
height: 45px;
width: 100px;
border: none;
color: white;
box-sizing: border-box;
background-color: #4e6ef2;
position: absolute;
left: 550px;
border-radius: 0 10px 10px 0;
cursor: pointer;
}
.imges {
position: absolute;
top: -140px;
left: 180px;
}
.cen {
text-align: center;
margin-bottom: 80px;
}
.buttom {
text-align: center;
padding-left: 30px;
position: fixed;
bottom: 0px;
left: 0;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 10px;
background-color: #fbfbfb;
}
.settings {
position: relative;
left: 13px;
background-color: #4e71f2;
color: #fff;
border-radius: 5px;
font-size: 12px;
width: 50px;
height: 25px;
display: inline-block;
}
.dropdown-settings {
position: relative;
display: inline-block;
}
.dropdown-content-settings {
display: none;
position: absolute;
right: -10px;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
}
.dropdown-settings:hover .dropdown-content-settings {
display: block;
}
</style>
</head>
<body>
<div class="left">
<a href="http://news.baidu.com/" target="blank">新闻</a
>
<a href="https://www.hao123.com/" target="blank">hao123</a
>
<a href="https://map.baidu.com/" target="blank">地图</a
>
<a href="https://tieba.baidu.com/" target="blank">贴吧</a
>
<a href="https://haokan.baidu.com/" target="blank">视频</a
>
<a href="https://image.baidu.com/" target="blank">图片</a
>
<a href="https://pan.baidu.com/" target="blank">网盘</a
>
<a href="https://www.baidu.com/more/" target="blank">更多</a
>
<span class="right">
<div class="dropdown">
<a href="#">设置</a>
</div>
<div class="dropdown-settings">
<button class="settings">登录</button>
</div>
</span>
</div>
<div class="box">
<div class="imges">
<img src="baidu.png" height="129" width="270" />
</div>
<input type="text"></input>
<button>
<span class="soutu-btn"></span>
<strong class="baiduyixia">百度一下</strong>
</button>
</form>
</div>
<div class="hot-title">
百度热榜
<div class="baiduhot">
<div class="left-hot">
<span class="title-content-title top">
<span class="top1"></span>
<a class="five" href="#">经济长期向好基本面没有改变</a>
</span>
<span class="title-content-title">
<span class="top2">1</span>
<a class="five" href="#">上海多地飘来“咖啡味” 官方回应</a>
</span>
<span class="title-content-title">
<span class="top3">2</span>
<a class="five" href="#">乌方将马里乌波尔控制权移交俄方</a>
</span>
</div>
<div class="right-hot">
<span class="title-content-title1">
<span class="other-top">3</span>
<a href="#">助企纾困举措密集出台</a>
</span>
<span class="title-content-title1">
<span class="other-top">4</span>
<a href="#">万元“乞丐鞋”为何遭群嘲?</a>
</span>
<span class="title-content-title1">
<span class="other-top">5</span>
<a href="#">奥密克戎超强变异株进入广东</a>
</span>
</div>
</div>
</div>
<div class="buttom">
<a href="#">关于百度</a>
<a href=" # ">About Baidu</a>
<a href="#">使用百度前必读</a>
<a href="#">帮助中心</a>
<a href="#">京公网安备11000002000001号</a>
<a href="#">京ICP证030173号</a>
<a href="#">@2022 Baidu</a> 互联网药品信息服务资格证书 (京)-经营性-2017-0020
<a href="#">信息网络传播视听节目许可证 0110516</a>
</div>
</body>
</html>