H5 笔记(百度首页)

index.css

body{
    background: url("../image/bg.jpg");
    background-size: cover;
}

#header{
    text-align: right;
}

#header a{
    color: #333;
    font-family: "arial";
    font-size: 13px;
    margin: 10px 7px;
    font-weight: bolder;
}

#header a.no-weight{
    font-weight: normal;
}

#header a.more-prodcuct{
    background-color: #3385ff;
    border: 1px solid #2d78f4;
    color: white;
    text-decoration: none;
    display: inline-block;
    width: 65px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}

#content{
   text-align: center;
   margin-top: 130px;
   margin-bottom: 450px;
}

#content img{
    width: 270px;
    height: 129px;
}

#content input{
    width: 500px;
    height: 25px;
    padding: 5px;
    padding-bottom: 2.5px;
    border: 1px solid #ddd;
    outline: none;
}

#content input:focus{
    border-color: #2d78f4;
}

#content a{
    background-color: #3385ff;
    border: 1px solid #2d78f4;
    color: white;
    text-decoration: none;
    display: inline-block;
    width: 100px;
    height: 32px;
    line-height: 32px;
    text-align: center;
    margin-left: -5px;
    border: 1px solid #2d78f4;
}

#footer{
    text-align: center;
    font-size: 12px;
}

#footer .footer-header{
    margin-bottom: 10px;
}

#footer .footer-header a{
    color: #00c;

    margin: 0px 5px;
}

#footer .footer-bottom{
    color: #666;
}

#footer .footer-bottom a{
    color: #666;
}

#footer .footer-bottom img{
    width: 14px;
    height: 17px;
}

index.html

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>百度一下,你就知道</title>
    <link href="css/index.css" rel="stylesheet">
</head>
<body>
   <!--头部-->
   <div id="header">
       <a href="#">新闻</a>
       <a href="#">hao123</a>
       <a href="#">地图</a>
       <a href="#">视频</a>
       <a href="#">贴吧</a>
       <a href="#" class="no-weight">登录</a>
       <a href="#" class="no-weight">设置</a>
       <a href="#" class="more-prodcuct">更多产品</a>
   </div>
   <!--主要内容-->
   <div id="content">
       ![](image/logo2.png)
       <div>
           <input>
           <a href="#">百度一下</a>
       </div>
   </div>
   <!--尾部-->
   <div id="footer">
       <div class="footer-header">
           <a href="#">把百度设为主页</a>
           <a href="#">关于百度</a>
           <a href="#">About  Baidu</a>
       </div>
       <div class="footer-bottom">
           ©2015 Baidu  <a href="#">使用百度前必读</a>  <a href="#">意见反馈</a> 京ICP证030173号
           ![](image/copy_rignt_24.png)
       </div>
   </div>
</body>
</html>
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 问答题47 /72 常见浏览器兼容性问题与解决方案? 参考答案 (1)浏览器兼容问题一:不同浏览器的标签默认的外补...
    _Yfling阅读 13,796评论 1 92
  • 转载请声明 原文链接地址 关注公众号获取更多资讯 第一部分 HTML 第一章 职业规划和前景 职业方向规划定位...
    前端进阶之旅阅读 16,611评论 32 459
  • 前些日子从@张鑫旭微博处得一份推荐(Front-end-tutorial),号称最全的资源教程-前端涉及的所有知识...
    谷子多阅读 4,268评论 0 44
  • 应该给自己鼓励一下,尽管已经累到嘴上长疮。 这是我身体独有的喜好,如果出现这个信号,表示你必须休息,而且要放松心情...
    林凡_阅读 298评论 0 0
  • -1- 这是一本什么样的书? 这是一本介绍快速学习方法的书。 本书的作者运用自己的发明的学习方法,10天完成线性代...
    马尔代夫的驴阅读 345评论 0 2