查看: 3244|回复: 0

[DIV/CSS] 百度前端学院|任务七

发表于 2018-1-1 08:00:00

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>任务七</title>
  6. <link rel="stylesheet" href="index.css" type="text/css">
  7. </head>
  8. <body>
  9. <div class="header">
  10. <img src="images/logo.png" alt="logo" class="logo">
  11. <span class="logo-wenzi">New World</span>
  12. <nav class="header-list">
  13. <a href="#">首页</a>
  14. <a href="#">最新活动</a>
  15. <a href="#">项目介绍</a>
  16. <a href="#">爱心社区</a>
  17. <a href="#">关于我们</a>
  18. <a href="#"><img src="images/login.png" alt="login" class="login-logo"><span class="login">登录</span></a>
  19. </nav>
  20. </div>
  21. <div class="content">
  22. <img src="images/picture1.png" alt="picture1" class="picture1"><img src="images/picture1_hidden.png" alt="图一遮盖图片" class="picture1_hidden">
  23. <div class="content1-weizi">
  24. <p class="content1-weizi-one">Time of new life</p>
  25. <p class="content1-weizi-two">新时代,年轻的人们让我们一起</p>
  26. <p class="content1-weizi-two">体验新生活,享受新生活</p>
  27. <a href="#" class="content1-weizi-three">开始体验</a>
  28. </div>
  29. <nav class="content-two clearfix">
  30. <div class="content-two-image">
  31. <img src="images/content_two-one.png" alt="content_two-one">
  32. </div>
  33. <div class="content-two-image">
  34. <img src="images/content_two-two.png" alt="content_two-one">
  35. </div>
  36. <div class="content-two-image">
  37. <img src="images/content_two-three.png" alt="content_two-one">
  38. </div>
  39. <div class="content-two-image">
  40. <img src="images/content_two-four.png" alt="content_two-one">
  41. </div>
  42. </nav>
  43. <div class="content-two-wenzi clearfix">
  44. <div><p>打造全新世界,让你更爱你的生活</p></div>
  45. <div><p>丰富多彩的公益活动,发挥新世界的主人公意识</p></div>
  46. <div><p>时尚的新理念,超前体验未知的生活</p></div>
  47. <div><p>完善的培养机制,培养你全新的世界观</p></div>
  48. </div>
  49. <div class="content-three">
  50. <p class="content-three-title">成为我们的志愿者</p>
  51. <div class="hr-one"></div>
  52. <div class="content-three-title-detail"><p>新世界的大家庭需要每一个爱生活的人加入,如果你够年轻有梦想,有激情,那就不要犹豫快来加入我们,成为改变所有人生活的人</p></div>
  53. </div>
  54. <div class="detail clearfix">
  55. <div class="detail-left">
  56. <p class="detail-left-title">新世界志愿者协议</p>
  57. <p class="detail-left-detail">加入新世界志愿者的人员必须遵守中华人民共共和国的
  58. 相关法律法规,并且本着平等资源的原则 ......</p>
  59. <div class="more"><img src="images/jiantou.png" alt="箭头"><a href="#">more</a></div>
  60. <p class="detail-left-title">新世界志愿者协议</p>
  61. <p class="detail-left-detail">加入新世界志愿者的人员必须遵守中华人民共共和国的
  62. 相关法律法规,并且本着平等资源的原则 ......</p>
  63. <div class="more"><img src="images/jiantou.png" alt="箭头"><a href="#">more</a></div>
  64. <p class="detail-left-title">新世界志愿者协议</p>
  65. <p class="detail-left-detail">加入新世界志愿者的人员必须遵守中华人民共共和国的
  66. 相关法律法规,并且本着平等资源的原则 ......</p>
  67. <div class="more"><img src="images/jiantou.png" alt="箭头"><a href="#">more</a></div>
  68. </div>
  69. <div class="detail-right clearfix">
  70. <input type="text" placeholder="姓名:" style="border:none;background-color: #ededef;width:
  71. 311px;height: 41px;text-indent: 20px" class="inner">
  72. <input type="text" placeholder="年龄:" style="border:none;background-color: #ededef;width:
  73. 311px;height: 41px;text-indent: 20px" class="inner">
  74. <input type="text" placeholder="联系方式:" style="border:none;background-color: #ededef;width:
  75. 311px;height: 41px;text-indent: 20px" class="inner">
  76. <input type="text" placeholder="联系地址:" style="border:none;background-color: #ededef;width:
  77. 311px;height: 41px;text-indent: 20px" class="inner">
  78. <input type="textarea" placeholder="简述你梦想生活" style="border:none;background-color: #ededef;width:
  79. 724px;height: 177px;text-indent: 20px" class="inner">
  80. <input type="button" value="提交" class="btn">
  81. </div>
  82. </div>
  83. </div>
  84. <div class="footer">
  85. <p class="footer-title">联系我们</p>
  86. <p class="footer-detail">为了更好的获取我们最新的产品资讯,您可以留下您的电子邮箱快速订阅我们的产品资讯
  87. 也可以通过以下任何方式关注我们动态</p>
  88. <div class="footer-email clearfix">
  89. <input type="text" placeholder="someone@email.com" class="email">
  90. <input type="button" value="提交" class="btn-two">
  91. </div>
  92. <div class="footer-icon">
  93. <img src="images/footer-one.png" alt="QQ" class="footer-icon-inner">
  94. <img src="images/footer-two.png" alt="Weibo" class="footer-icon-inner">
  95. <img src="images/footer-three.png" alt="Facebook" class="footer-icon-inner">
  96. <img src="images/footer-four.png" alt="Google" class="footer-icon-inner">
  97. </div>
  98. </div>
  99. </body>
  100. </html>
复制代码

  

  1. /*通用*/
  2. *{padding: 0;margin: 0;border: 0}
  3. .clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}
  4. .clearfix{*+height:1%;}
  5. /*header*/
  6. .header{width: 100%;height: 56px;margin: 0;background-color: #fff;}
  7. .logo{margin-left: 59px;margin-top: 12px}
  8. .logo-wenzi{font-size: 26px;font-family: Verdana;color: #393a3a;font-weight: bold;margin-left: 5px;}
  9. .header-list{float: right;margin-right: 68px;height: 56px;line-height: 56px;}
  10. .header-list a{padding:0 32px;text-decoration: none;height: 56px;display: block;float: left;font-size: 14px;font-family: "Microsoft YaHei";color: #787b83}
  11. .header-list a:hover{border-bottom: 5px solid #e74f4d;color: #e74f4d;box-sizing: border-box}
  12. .login-logo{margin-right: 5px;vertical-align: middle}
  13. .login{vertical-align: middle;color: #e74f4d}
  14. /*content*/
  15. .picture1{width: 100%;height: 692px}
  16. .content{position: relative}
  17. .picture1_hidden{width: 100%;position: absolute;left: 0;top: 0;height: 692px}
  18. .content1-weizi{position: absolute;left: 115px;top: 231px}
  19. .content1-weizi-one{font-size: 60px;font-family: "Microsoft YaHei";color: #fff;margin-bottom: 32px}
  20. .content1-weizi-two{color: #fff;font-size: 21px;font-family: "Microsoft YaHei";padding-bottom: 10px;padding-left: 10px}
  21. .content1-weizi-three{font-size: 30px;display: block;text-decoration: none;font-family: 微软雅黑;color: #fff;text-align: center;line-height: 64px}
  22. .content1-weizi a{height: 64px;width: 330px;margin-top: 67px;background-color: #e7504d}
  23. .content1-weizi a:hover{border-bottom: 3px solid #fff;box-sizing: border-box}
  24. /*content-two*/
  25. .content-two-image{display: block;width: 25%;float: left;margin-top: 46px}
  26. .content-two-image img{margin-left: 153px}
  27. .content-two-wenzi div p{font-size: 14px;font-family: 黑体;color: #767777;text-align: center;padding: 0 25%}
  28. .content-two-wenzi{margin-top: 48px}
  29. .content-two-wenzi div{width: 25%;float: left;border-right: solid 2px #bbb;box-sizing: border-box}
  30. .content-two-wenzi div:last-child{border: none}
  31. /*content-three*/
  32. .content-three{margin-bottom: 106px}
  33. .content-three-title{font-size: 21px;font-family: 黑体;color: #323333;text-align: center;margin-top: 120px}
  34. .hr-one{width: 30px;height: 2px;background-color: #ea6563;text-align: center;margin: 20px auto}
  35. .content-three-title-detail{margin: 0 35%}
  36. .content-three-title-detail p{font-size: 12px;font-family: "Microsoft YaHei";color: #aaa;text-align: center;line-height: 18px}
  37. .detail-left{float: left;padding-left: 140px;width: 287px;}
  38. .detail-left-title{font-size: 14px;font-family: 黑体;color: #aaa;font-weight: bold;margin-bottom: 21px}
  39. .detail-left-detail{font-size: 12px;color: #aaa;font-family: 宋体;line-height: 21px}
  40. .more a{font-size: 12px;line-height: 20px;color: #aaa;font-family: 宋体;margin-left: 5px;text-decoration: none;}
  41. .more a:hover{color: #e74f4d}
  42. .more{display: block;text-align: right;margin-bottom: 20px}
  43. .inner{float: left;margin:0 50px 14px 50px;}
  44. .btn{border: none;width: 724px;height: 40px;float: left;margin:0 50px 14px 50px;}
  45. .detail-right{margin-bottom: 167px}
  46. /*footer*/
  47. .footer{background-color: #33363f;height: 358px}
  48. .footer-title{font-size: 21px;color: #fff;font-family: 黑体;text-align: center;padding-top: 90px}
  49. .footer-detail{font-size: 12px;font-family: 宋体;line-height: 18px;color: #fff;padding: 20px 30%;text-align: center}
  50. .footer-email{margin-top: 20px;margin-left: 31%;margin-bottom: 36px}
  51. .email{height: 41px;width: 430px;text-indent: 20px;border-style: none;}
  52. .btn-two{height: 41px;width: 80px;border-style: none;}
  53. .email,.btn-two{float: left;}
  54. .footer-icon{width: 180px;margin: 0 auto;}
  55. .footer-icon-inner{margin-right: 18px}
  56. .footer-icon img:last-child{margin-right: 0}
复制代码

  效果:



回复

使用道具 举报