用HTML和CSS仿作百度一下網頁。

來源:互聯網
上載者:User

標籤:

前端新手做的第一個網頁,仿照了百度一下網頁布局,還有很多特效沒弄出來。

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
    *{
      padding: 0;
      margin: 0;
    }
    .box1{
      margin-top: 19px;
      margin-bottom:5px;
      display: inline-block;
      clear: both;
      float: right; 
    }
    a{
      margin-left: 18px;
      line-height: 24px;
      font-size: 13px ;
      color: black;
      text-decoration:underline;
      font-weight: bold;
      }
    #zzr{
      display: inline;
    list-style: none;
    }
    .box1 li ul {
      list-style: none;
      display: none;
      position: relative;
    }
    .box1 li:hover ul {
      border: 1px solid #ccc;
      color: #06f;
      display: block;
      position: absolute;
      right: 60px;top: 38px;
    }
    .shezhi{
      text-decoration: none;
      font-weight: normal;
      padding-right: 15px;
    }
    .more{
      background-color: #38f;
      color: #fff;
      display: inline-block;
      text-align: center;
      text-decoration: none;
      width: 60px;
    }
    #logo{
      display: block;
      text-align: center;
      padding-top: 48px;
    }
    form{
      text-align: center;
          }
    input{
      padding:0 0 0 7px;
      width: 538px;
      height: 33px;
      border: 1px solid #b6b6b6;
    }
    button{
      width:100px;
      height:36px;
      border:0;
      background-color: #3385ff;
      color:#fff;
      font-size: 15px;
      }
    form button:hover{
      cursor: pointer;
    }
</style>
  <title>百度一下</title>
</head>
<body>
    <div class="box1">
      <a href="https://www.nuomi.com/?cid=002540">糯米</a>
      <a href="http://news.baidu.com/">新聞</a>
      <a href="https://www.hao123.com/?tn=97774645_hao_pg">hao123</a>
      <a href="http://map.baidu.com/">地圖</a>
      <a href="http://v.baidu.com/">視頻</a>    
      <a href="http://tieba.baidu.com/">貼吧</a>
      <a style="font-weight:normal">登入</a>
      <li id="zzr"><a style="font-weight:normal">設定</a>
      <ul>
        <li><a href="#" class="shezhi">搜尋設定</a></li>
        <li><a href="#" class="shezhi">進階搜尋</a></li>
        <li><a href="#" class="shezhi">關閉預測</a></li>
        <li><a href="#" class="shezhi">搜尋曆史</a></li>
      </ul></li>
      <a class="more">更多產品</a>
      </div>    
      <div id="logo">
      <img src="https://www.baidu.com/img/bd_logo1.png">
      </div>
      <form>     
      <input type="text"><button type="button">百度一下</button>
    </form>
</body>
</html>

如下所示:

用HTML和CSS仿作百度一下網頁。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.