博客列表 >1220作业

1220作业

孤心泪的博客
孤心泪的博客原创
2019年12月22日 03:21:23762浏览


html

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>1220作业</title>
  8. <link rel="stylesheet" href="font/iconfont.css">
  9. <link rel="stylesheet" href="1220.css">
  10. </head>
  11. <body>
  12. <main>
  13. <header class="clearfix">
  14. <!-- logo -->
  15. <div class=" f_l logo">
  16. <a href="">
  17. <img src="./image/logo.png" alt="" class="logo_img">
  18. </a>
  19. </div>
  20. <div class="f_r header_right">
  21. <!-- 搜索框 -->
  22. <div class="serach f_l">
  23. <input type="text" placeholder="请输入关键字">
  24. <i class="iconfont icon-jinduchaxun"></i>
  25. </div>
  26. <!-- icon -->
  27. <div class="icons f_l">
  28. <i class="iconfont icon-huiyuan1"></i>
  29. <i class="iconfont icon-danmu1"></i>
  30. <i class="iconfont icon-fabu"></i>
  31. <i class="iconfont icon-sousuofangda"></i>
  32. <i class="iconfont icon-huiyuan3"></i>
  33. <i class="iconfont icon-dianzan"></i>
  34. </div>
  35. </div>
  36. </header>
  37. <!-- 快速导航栏 -->
  38. <ul class="mg_t_10 clearfix">
  39. <li class="fast_nav">
  40. <div class="fast_nav_left f_l">
  41. <i class="iconfont icon-gongdan red fontsize_32"></i>
  42. <div class="f_r">
  43. <a href="" class="nav_item block">资讯</a>
  44. <a href="" class="nav_item block">学习</a>
  45. </div>
  46. </div>
  47. <div class="fast_nav_right f_l">
  48. <ul class="son_ul">
  49. <li><a href="">富强</a></li>
  50. <li><a href="">民主</a></li>
  51. <li><a href="">文明</a></li>
  52. <li><a href="">和谐</a></li>
  53. <li><a href="">自由</a></li>
  54. <li><a href="">平等</a></li>
  55. <li><a href="">公正</a></li>
  56. <li><a href="">法治</a></li>
  57. </ul>
  58. </div>
  59. </li>
  60. <li class="fast_nav">
  61. <div class="fast_nav_left f_l">
  62. <i class="iconfont icon-gongdan red fontsize_32"></i>
  63. <div class="f_r">
  64. <a href="" class="nav_item block">资讯</a>
  65. <a href="" class="nav_item block">学习</a>
  66. </div>
  67. </div>
  68. <div class="fast_nav_right f_l">
  69. <ul class="son_ul">
  70. <li><a href="">富强</a></li>
  71. <li><a href="">民主</a></li>
  72. <li><a href="">文明</a></li>
  73. <li><a href="">和谐</a></li>
  74. <li><a href="">自由</a></li>
  75. <li><a href="">平等</a></li>
  76. <li><a href="">公正</a></li>
  77. <li><a href="">法治</a></li>
  78. </ul>
  79. </div>
  80. </li>
  81. <li class="fast_nav">
  82. <div class="fast_nav_left f_l">
  83. <i class="iconfont icon-gongdan red fontsize_32"></i>
  84. <div class="f_r">
  85. <a href="" class="nav_item block">资讯</a>
  86. <a href="" class="nav_item block">学习</a>
  87. </div>
  88. </div>
  89. <div class="fast_nav_right f_l">
  90. <ul class="son_ul">
  91. <li><a href="">富强</a></li>
  92. <li><a href="">民主</a></li>
  93. <li><a href="">文明</a></li>
  94. <li><a href="">和谐</a></li>
  95. <li><a href="">自由</a></li>
  96. <li><a href="">平等</a></li>
  97. <li><a href="">公正</a></li>
  98. <li><a href="">法治</a></li>
  99. </ul>
  100. </div>
  101. </li>
  102. <li class="fast_nav">
  103. <div class="fast_nav_left f_l">
  104. <i class="iconfont icon-gongdan red fontsize_32"></i>
  105. <div class="f_r">
  106. <a href="" class="nav_item block">资讯</a>
  107. <a href="" class="nav_item block">学习</a>
  108. </div>
  109. </div>
  110. <div class="fast_nav_right f_l">
  111. <ul class="son_ul">
  112. <li><a href="">富强</a></li>
  113. <li><a href="">民主</a></li>
  114. <li><a href="">文明</a></li>
  115. <li><a href="">和谐</a></li>
  116. <li><a href="">自由</a></li>
  117. <li><a href="">平等</a></li>
  118. <li><a href="">公正</a></li>
  119. <li><a href="">法治</a></li>
  120. </ul>
  121. </div>
  122. </li>
  123. </ul>
  124. <!-- 图片区 -->
  125. <div class="imgs clearfix">
  126. <div class="img_l f_l mg_r_15">
  127. <img src="./image/2.jpg" alt="">
  128. </div>
  129. <div class="img_r f_l">
  130. <img src="./image/banner-right.jpg" alt="">
  131. </div>
  132. </div>
  133. </main>
  134. </body>
  135. </html>

CSS

  1. * {
  2. margin: 0;
  3. padding: 0;
  4. }
  5. body {
  6. padding-top: 50px;
  7. }
  8. main {
  9. width: 1200px;
  10. margin: 0 auto;
  11. }
  12. li{
  13. list-style: none;
  14. }
  15. a {
  16. text-decoration: none;
  17. color: #333;
  18. }
  19. .f_r{
  20. float: right;
  21. }
  22. .f_l {
  23. float: left;
  24. }
  25. .mg_t_10{
  26. margin-top: 10px;
  27. }
  28. .mg_r_15{
  29. margin-right: 15px;
  30. }
  31. .block{
  32. display: block;
  33. }
  34. .fontsize_32{
  35. font-size: 40px;
  36. }
  37. .clearfix:after,.clearfix:before{
  38. content: "";
  39. display: table;
  40. }
  41. .clearfix:after{
  42. clear: both;
  43. }
  44. .clearfix{
  45. *zoom: 1;
  46. }
  47. .red {
  48. color: red;
  49. }
  50. .logo{
  51. height: 76px;
  52. }
  53. .logo>img{
  54. display: block;
  55. height: 100%;
  56. }
  57. .header_right{
  58. margin-top: 28px;
  59. }
  60. .serach{
  61. position: relative;
  62. z-index: 1;
  63. height: 30px;
  64. width: 300px;
  65. border: 1px solid #ccc;
  66. border-radius: 10px;
  67. overflow: hidden;
  68. }
  69. .serach:hover{
  70. box-shadow: 0px 0px 5px #ccc;
  71. }
  72. .serach>input{
  73. width: 100%;
  74. height: 100%;
  75. display: block;
  76. border: none;
  77. border-radius: 10px;
  78. outline: none;
  79. text-indent: 10px;
  80. padding-right: 10px;
  81. }
  82. .icon-jinduchaxun{
  83. position: absolute;
  84. right: 5px;
  85. top: calc(50% - 7.5px);
  86. width: 15px;
  87. height: 15px;
  88. font-size: 15px;
  89. }
  90. .icons {
  91. margin-left: 50px;
  92. }
  93. .icons>i{
  94. width: 50px;
  95. height: 50px;
  96. margin-right: 15px;
  97. font-size: 30px;
  98. }
  99. .icons>i:hover{
  100. color: red;
  101. }
  102. .fast_nav{
  103. margin-right: 0px;
  104. width: 300px;
  105. float: left;
  106. }
  107. .fast_nav_left{
  108. padding-right: 10px;
  109. border-right: 1px solid #ccc;
  110. box-sizing: border-box;
  111. }
  112. .son_ul{
  113. width: 200px;
  114. margin-left: 10px;
  115. }
  116. .son_ul>li{
  117. float: left;
  118. width: 35px;
  119. margin-right: 10px;
  120. }
  121. .son_ul>li>a{
  122. display: block;
  123. text-align: center;
  124. }
  125. .imgs {
  126. margin-top: 30px;
  127. }
  128. .imgs img{
  129. display: block;
  130. }
  131. .img_l{
  132. width: 850px;
  133. margin-right: 50px;
  134. }
  135. .img_l>img{
  136. width: 100%;
  137. }
  138. .img_l:hover{
  139. box-shadow: 0px 0px 50px #ccc;
  140. }
  141. .img_r>img{
  142. height: 300px;
  143. display: block;
  144. }
  145. .img_r:hover{
  146. box-shadow: 0px 0px 50px #ccc;
  147. }
上一条:HTML标签总结下一条:重命名文件
声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议