html加css仿作百度界面

效果图

源码

<!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
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="https://www.hao123.com/" target="blank">hao123</a
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="https://map.baidu.com/" target="blank">地图</a
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="https://tieba.baidu.com/" target="blank">贴吧</a
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="https://haokan.baidu.com/" target="blank">视频</a
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="https://image.baidu.com/" target="blank">图片</a
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="https://pan.baidu.com/" target="blank">网盘</a
        >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="https://www.baidu.com/more/" target="blank">更多</a
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <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> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href=" # ">About Baidu</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="#">使用百度前必读</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="#">帮助中心</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="#">京公网安备11000002000001号</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="#">京ICP证030173号</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="#">@2022 Baidu</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 互联网药品信息服务资格证书 (京)-经营性-2017-0020 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <a href="#">信息网络传播视听节目许可证 0110516</a>
    </div>
</body>

</html>

  • 1
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值