百度网页——进阶版

百度网页——进阶版

HTML源码:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>百度一下,你就知道</title>
    <link href="baidu2.css" rel="stylesheet">
  </head>
  <body style="font-family: 小米兰亭">
    <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="http://v.baidu.com/" target="blank">视频</a
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="https://tieba.baidu.com/index.html" target="blank">贴吧</a
      >&nbsp;&nbsp;&nbsp;&nbsp;
      <a href="http://xueshu.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">
          <span>设置</span>
          <div class="dropdown-content">
            <a target="blank" href="">搜索设置</a>
            <a target="blank" href="">高级设置</a>
            <a target="blank" href="">关闭预测</a>
            <a target="blank" href="">隐私设置</a>
            <a target="blank" href="">关闭热榜</a>
          </div>
        </div>
        <div class="dropdown-settings">
          <button class="settings">登录</button>
          <div class="dropdown-content-settings">
            <img   src="登录.jpg" width="400" height="500"/>
          </div>
        </div>
      </span>
    </div>

    <div class="box">
      <form action="http://www.baidu.com/" target="_blank">
        <div class="imges">
          <img src="百度logo.jpg"  alt="百度logo" title="百度一下,你就知道"  height="130"  width="300" />
        </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">1</span>
            <a
              class="five"
              href="https://www.baidu.com/s?cl=3&tn=baidutop10&fr=top1000&wd=%E5%B9%BF%E5%B7%9E%E5%8D%97%E6%B2%99%E6%96%B0%E5%A2%9E6%E4%BE%8B%E6%84%9F%E6%9F%93%E8%80%85%E4%B8%BA%E4%B8%80%E5%AE%B6%E4%BA%BA&rsv_idx=2&rsv_dl=fyb_n_homepage&hisfilter=1"
              target="_blank ">广州南沙新增6例感染者为一家人</a
            >
          </span>
          <span class="title-content-title">
            <span class="top2">2</span>
            <a
              class="five"
              href="https://www.baidu.com/s?cl=3&tn=baidutop10&fr=top1000&wd=%E7%A7%91%E5%85%B4%3A%E6%8E%A5%E7%A7%8D%E7%AC%AC3%E9%92%88%E7%96%AB%E8%8B%97%E6%8A%97%E4%BD%93%E6%8F%90%E5%8D%8710%E5%80%8D&rsv_idx=2&rsv_dl=fyb_n_homepage&hisfilter=1"
              target="_blank ">科兴:接种第3针疫苗抗体提升10倍</a
            >
          </span>
          <span class="title-content-title">
            <span class="top3">3</span>
            <a
              class="five"
              href="https://www.baidu.com/s?cl=3&tn=baidutop10&fr=top1000&wd=%E7%A6%BB%E5%BC%80%E5%B9%BF%E5%B7%9E%E5%87%BA%E7%9C%81%E9%9C%80%E6%8C%8148%E5%B0%8F%E6%97%B6%E5%86%85%E9%98%B4%E6%80%A7%E8%AF%81%E6%98%8E&rsv_idx=2&rsv_dl=fyb_n_homepage&hisfilter=1"
              target="_blank ">离开广州出省需持48小时内阴性证明</a
            >
          </span>
        </div>
        <div class="right-hot">
          <span class="title-content-title1">
            <span class="other-top">4</span>
            <a
              href="https://www.baidu.com/s?cl=3&tn=baidutop10&fr=top1000&wd=%E6%AF%9B%E5%9D%A6%E5%8E%82%E9%80%81%E8%80%83%E5%A4%B4%E8%BD%A6%E8%BD%A6%E7%89%8C%E5%B0%BE%E5%8F%B7666&rsv_idx=2&rsv_dl=fyb_n_homepage&hisfilter=1"
              target="_blank ">毛坦厂送考头车车牌尾号666</a
            >
          </span>
          <span class="title-content-title1">
            <span class="other-top">5</span>
            <a
              href="https://www.baidu.com/s?cl=3&tn=baidutop10&fr=top1000&wd=%E5%B9%BF%E5%B7%9E4%E5%9C%B0%E8%B0%83%E6%95%B4%E4%B8%BA%E4%B8%AD%E9%A3%8E%E9%99%A9%E5%9C%B0%E5%8C%BA&rsv_idx=2&rsv_dl=fyb_n_homepage&hisfilter=1"
              target="_blank " >广州4地调整为中风险地区</a
            >
          </span>
          <span class="title-content-title1">
            <span class="other-top">6</span>
            <a
              href="https://www.baidu.com/s?cl=3&tn=baidutop10&fr=top1000&wd=%E9%AB%98%E8%80%83%E5%8A%A0%E6%B2%B9&rsv_idx=2&rsv_dl=fyb_n_homepage&hisfilter=1"
              target="_blank ">高考加油</a
            >
          </span>
        </div>
      </div>
    </div>


    <div id="footer" class="footer">
        <a href="https://www.baidu.com/cache/setindex/index.html" target="_blank">设为主页</a>
        <a href="http://home.baidu.com/" target="_blank">关于百度</a>
        <a href="http://ir.baidu.com/phoenix.zhtml?c=188488&p=irol-homeprofile" target="_blank">About  Baidu</a>
        <a href="https://www.baidu.com/duty/">使用百度前必读</a> 
        <a href="http://help.baidu.com/newadd?prod_id=1&category=4">意见反馈</a> 
        <a href="https://help.baidu.com/">帮助中心</a> 
        <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11000002000001">京公网安备11000002000001号</a> 
        <a href="https://beian.miit.gov.cn/">京ICP证030173号</a> 
        <a>©2021 Baidu  </a>
        <a> (京)-经营性-2017-0020信息网络传播视听节目许可证   </a>
        <a>0110516</a>
    
    
</div>


  </body>
</html>

CSS源码:

a {
    color: black;
  }
  a:link {
    text-decoration: none;
  } 
  a:visited {
    text-decoration: none;
  } 
  a:hover {
    color: #4e6ef2;
    text-decoration: none;
  }
  a:active {
    text-decoration: none;
  } 
  .left {
    line-height: 22px;
    font-size: 15px;
    text-align: left;
    margin: 22px 0 22px 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;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    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;
  }
  input:focus {
    color: #000;
    background-color: #fff;
    border-color: #4e6ef2 !important;
    height: 45px;
    border-radius: 10px 0 10px 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;
  }
#footer{
    position: fixed;
    bottom: 0px;
    width: 100%;
    padding: 50px 0;
    text-align: center;
    font-size: 13px;
}
.footer{
    margin-bottom: 8px;
    color: darkgray;
}
.footer a{
    margin: 0% 5px;
    color: darkgray;
    text-decoration: none;
}

网页效果图
百度网页——进阶版

上一篇:前端_HTML_03:标签


下一篇:CSS——样式表