Blogger Information
Blog 31
fans 2
comment 0
visits 27599
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
百度网站首页PC端
霏梦
Original
4086 people have browsed it

— 作者:霏梦

pc端网站首页


  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. <link rel="stylesheet" href="./css/font-icon.css" type="text/css" />
  7. <title>百度一下,你就知道</title>
  8. <style>
  9. /* 初始化 */
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: border-box;
  14. }
  15. a {
  16. text-align: center;
  17. text-decoration: none;
  18. }
  19. li,
  20. dd {
  21. list-style: none;
  22. }
  23. html,body {
  24. display: flex;
  25. flex-flow: column nowrap;
  26. min-width: 1250px;
  27. height: 100%;
  28. }
  29. .head {
  30. display: flex;
  31. min-width: 1250px;
  32. height: 60px;
  33. padding: 10px;
  34. /* border: 1px solid red; */
  35. align-items: center;
  36. justify-content: space-between;
  37. font-family: Arial, "Microsoft YaHei", sans-serif;
  38. /* background-color: mediumslateblue; */
  39. }
  40. .head-left {
  41. display: flex;
  42. align-items: center;
  43. /* margin: ; */
  44. padding: 10px 1px;
  45. height:60px;
  46. }
  47. .head-left > a {
  48. font-size: 13px;
  49. font-family: Arial, "Microsoft YaHei", sans-serif;
  50. padding: 5px 15px;
  51. height: 23px;
  52. text-align: center;
  53. /* border: 1px solid red; */
  54. }
  55. .head-left > a:hover {
  56. color: blue;
  57. }
  58. .head-left > a:visited {
  59. color: #222222;
  60. }
  61. .head-right {
  62. display: flex;
  63. align-items: center;
  64. margin-right: 30px;
  65. }
  66. .head-right > a {
  67. font-size: 13px;
  68. /* font-family: Arial, "Microsoft YaHei", sans-serif; */
  69. padding: 3px 10px;
  70. }
  71. .head-right > a:first-of-type {
  72. color: #f63051;
  73. }
  74. .head-right > a:first-of-type:hover {
  75. color: #f63051;
  76. }
  77. .head-right > a:first-of-type:visited {
  78. color: #f63051;
  79. }
  80. .head-right > span {
  81. font-size: 13px;
  82. padding: 0 20px;
  83. color: #222222;
  84. }
  85. .head-right > span:hover {
  86. color: blue;
  87. }
  88. .head-right > span:visited {
  89. color: #222222;
  90. }
  91. .head-right > a:last-of-type {
  92. border-radius: 6px;
  93. background-color: #4e71f2;
  94. color: #ffffff;
  95. cursor: pointer;
  96. height: 25px;
  97. }
  98. .logo {
  99. display: flex;
  100. align-content: center;
  101. margin: 0 auto;
  102. }
  103. .logo > a >img {
  104. height: 127px;
  105. width: 270px;
  106. /* align-items: center; */
  107. }
  108. .search {
  109. display: flex;
  110. justify-content: center;
  111. line-height: 45px;
  112. }
  113. .search > input:first-of-type {
  114. width: 546px;
  115. height: 44px;
  116. font-size: 16px;
  117. border: 2px solid #c4c7ce;
  118. border-radius: 10px 0 0 10px;
  119. box-shadow: none;
  120. background: #fff;
  121. color: #222;
  122. }
  123. .search > input:last-of-type {
  124. background-color: #4e6ef2;
  125. width: 108px;
  126. border-radius: 0 10px 10px 0;
  127. font-size: 17px;
  128. color: #fff;
  129. height: 44px;
  130. line-height: 45px;
  131. box-shadow: none;
  132. font-weight: 400;
  133. border: none;
  134. outline: none;
  135. }
  136. .hot-change {
  137. display: flex;
  138. width: 654px;
  139. justify-content: space-between;
  140. margin: 20px auto;
  141. /* background-color: #4e71f2; */
  142. }
  143. .hot-change > a:first-of-type {
  144. color: #222;
  145. font-size: 14px;
  146. font-family: Arial, "Microsoft YaHei", sans-serif;
  147. }
  148. .hot-change > a:last-of-type {
  149. color: #9195a3;
  150. font-size: 13px;
  151. }
  152. .hotlist {
  153. display: flex;
  154. width: 654px;
  155. /* height: 320px; */
  156. height: 100%;
  157. /* padding: 5px 0px; */
  158. margin: 5px auto;
  159. flex-flow: row nowrap;
  160. /* align-content: space-between; */
  161. }
  162. .hotlist > .row {
  163. display: flex;
  164. flex-grow: 1;
  165. /* height: 100px; */
  166. /* justify-content: space-between; */
  167. }
  168. .hotlist > .row > ul > li > a {
  169. /* padding: 10px 0 10px 0; */
  170. /* height: 40px; */
  171. /* margin:30px 0 30px 0; */
  172. color: #222;
  173. }
  174. .row>ul>li>a:hover{
  175. color: blue;
  176. }
  177. .row > ul > li > span:first-of-type {
  178. /* padding-top: 10px 10px 10px 10px; */
  179. /* margin:10px 10px 10px 10px; */
  180. /* color: aqua; */
  181. }
  182. .qrcode{
  183. display: flex;
  184. justify-content: flex-end;
  185. height: 30px;
  186. }
  187. .qrcode > a >span{
  188. margin-right: 20px;
  189. /* height: 30px; */
  190. width: 30px;
  191. color: darkgray;
  192. font-size: 20px;
  193. }
  194. .footer {
  195. display: flex;
  196. text-align: center;
  197. justify-content: space-between;
  198. align-items: center;
  199. height: 40px;
  200. margin: 0 10px;
  201. background-color: #fafafa;
  202. font-family: Arial, "Microsoft YaHei", sans-serif;
  203. }
  204. .footer-left > a {
  205. color: #9195a3;
  206. font-size: 12px;
  207. padding: 10px 10px;
  208. }
  209. .footer-right > span {
  210. font-size: 12px;
  211. color: #9195a3;
  212. margin: 0 10px;
  213. }
  214. .footer-right > a {
  215. font-size: 12px;
  216. color: #9195a3;
  217. }
  218. </style>
  219. </head>
  220. <body>
  221. <div class="head">
  222. <div class="head-left">
  223. <a href="" target="_blank">新闻</a>
  224. <a href="" target="_blank">hao123</a>
  225. <a href="" target="_blank">地图</a>
  226. <a href="" target="_blank">视频</a>
  227. <a href="" target="_blank">贴吧</a>
  228. <a href="" target="_blank">学术</a>
  229. <a href="" target="_blank">更多</a>
  230. </div>
  231. <div class="head-right">
  232. <a href="">抗击疫情</a>
  233. <span>设置</span>
  234. <a href="" style="text-align: center;">登录</a>
  235. </div>
  236. </div>
  237. <div class="logo">
  238. <a href=""
  239. ><img
  240. src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"
  241. alt=""
  242. /></a>
  243. </div>
  244. <div class="search">
  245. <input type="text" name="" maxlength="255" autocomplete="off" />
  246. <input type="submit" name="" class="s_btn" value="百度一下" />
  247. </div>
  248. <div class="hot-change">
  249. <a href="" class="hot-title">百度热榜</a>
  250. <a href="" class="change"
  251. ><span class="iconfont"></span>
  252. <span>换一换</span>
  253. </a>
  254. </div>
  255. <div class="hotlist">
  256. <div class="row">
  257. <ul>
  258. <li>
  259. <span class="iconfont" style="color:darksalmon;"></span>
  260. <a href=""></a>北京现有39个中风险地区</a>
  261. <span class="iconfont" style="color: coral; padding: 30px;"></span>
  262. </li>
  263. <li>
  264. <span class="iconfont" style="color: lightblue;"></span>
  265. <a href="">英国民众无视疫情涌向南部海边</a>
  266. </li>
  267. <li>
  268. <span class="iconfont" style="color: mediumslateblue;"></span>
  269. <a href="">北京老郑州烩面馆又有两员工确诊</a>
  270. </li>
  271. </ul>
  272. </div>
  273. <div class="row">
  274. <ul>
  275. <li>
  276. <span class="iconfont"></span>
  277. <a href="">易烊千玺谈回锅肉</a>
  278. </li>
  279. <li>
  280. <span class="iconfont"></span>
  281. <a href="">北京7社区解除应急封闭管理</a>
  282. </li>
  283. <li>
  284. <span class="iconfont"></span>
  285. <a href="">乘风破浪的姐姐淘汰名单</a>
  286. </li>
  287. </ul>
  288. </div>
  289. </div>
  290. <div class="qrcode">
  291. <a href="">
  292. <span class="iconfont"></span>
  293. </a>
  294. </div>
  295. <div class="footer">
  296. <div class="footer-left">
  297. <a href="">设为首页</a>
  298. <a href="">关于百度</a>
  299. <a href="">About Baidu</a>
  300. <a href="">百度营销</a>
  301. <a href="">使用百度前必读</a>
  302. <a href="">意见反馈</a>
  303. <a href="">帮助中心</a>
  304. </div>
  305. <div class="footer-right">
  306. <span>©2020 Baidu (京)-经营性-2017-0020</span>
  307. <a href="">京公网安备11000002000001号</a>
  308. <span>京ICP证030173号</span>
  309. </div>
  310. </div>
  311. </body>
  312. </html>
  • 效果图
    百度

  • 总结:
  • 在实际过程中,还是会出现位置调出来后不对。
  • 望对这个案例帮忙讲解一下思路,问题出在哪了。
  • 多谢!
Correcting teacher:天蓬老师天蓬老师

Correction status:qualified

Teacher's comments:遇到问题,可以在群中提问, 课程还是要按教学计划正常进行,请理解
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post