博客列表 >仿PHP中文网布局实战

仿PHP中文网布局实战

王佳祥
王佳祥原创
2020年06月27日 11:17:001200浏览

仿PHP中文网Flex布局实战

  • 做完效果:




  • 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. <title>php中文网</title>
  7. <link rel="stylesheet" href="css/common.css" />
  8. <link rel="stylesheet" href="css/index.css" />
  9. <link rel="stylesheet" href="font_icon/iconfont.css">
  10. <script src="font_icon/iconfont.js"></script>
  11. </head>
  12. <body class="flexCompatible flexVertical flexShrinkFixed">
  13. <!-- 导航 -->
  14. <header>
  15. <ul class="flexCompatible flexDirV flexAlignC flexShrinkFixed">
  16. <li><a href=""><img src="images/logo.png" alt="php中文网" /></a></li>
  17. <li><a href="">首页</a></li>
  18. <li><a href="">视频教程</a></li>
  19. <li><a href="">入门教程</a></li>
  20. <li><a href="">社区问答</a></li>
  21. <li class="flexCompatible flexVertical">
  22. <a href="" class="flexCompatible flexAlignC flexGrow">技术文章<span class="iconfont">&#xe66a;</span></a>
  23. <ul class="show ">
  24. <li><a href="">头条</a></li>
  25. <li><a href="">博客</a></li>
  26. <li><a href="">php教程</a></li>
  27. <li><a href="">php框架</a></li>
  28. <li><a href="">php小知识</a></li>
  29. <li><a href="">mysql教程</a></li>
  30. <li><a href="">html教程</a></li>
  31. <li><a href="">css教程</a></li>
  32. <li><a href="">js教程</a></li>
  33. <li><a href="">服务器运维</a></li>
  34. </ul>
  35. </li>
  36. <li>
  37. <a href="" class="flexCompatible flexAlignC flexGrow">资源下载<span class="iconfont">&#xe66a;</span></a>
  38. <ul class="show show1 ">
  39. <li><a href="">php工具</a></li>
  40. <li><a href="">在线工具</a></li>
  41. <li><a href="">手册下载</a></li>
  42. <li><a href="">学习课件</a></li>
  43. <li><a href="">js特效</a></li>
  44. <li><a href="">后端模板</a></li>
  45. <li><a href="">网站源码</a></li>
  46. <li><a href="">类库下载</a></li>
  47. </ul>
  48. </li>
  49. <li>
  50. <a href="" class="flexCompatible flexAlignC flexGrow">编程词典<span class="iconfont">&#xe66a;</span></a>
  51. <ul class="show ">
  52. <li><a href="">php词典</a></li>
  53. <li><a href="">原生手册</a></li>
  54. <li><a href="">mysql词典</a></li>
  55. <li><a href="">Linux词典</a></li>
  56. <li><a href="">Redis词典</a></li>
  57. <li><a href="">html词典</a></li>
  58. <li><a href="">Javascript词典</a></li>
  59. <li><a href="">CSS词典</a></li>
  60. <li><a href="">Bootstrap词典</a></li>
  61. <li><a href="">jQuery词典</a></li>
  62. </ul>
  63. </li>
  64. </li>
  65. <li><a href="">工具下载<span class="yd">&nbsp;●</span></a></li>
  66. <li><a href="">php培训<span class="xin"></span></a></li>
  67. <div class="flexCompatible">
  68. <a href="">登录</a>
  69. <a href="">注册</a>
  70. </div>
  71. </ul>
  72. </header>
  73. <!-- 轮播图 -->
  74. <div id="content1" class="flexCompatible">
  75. <div class="lbleft flexCompatible flexVertical">
  76. <ul>
  77. <li>
  78. <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;php开发</a>
  79. <span class="iconfont" style="color:RGB(168, 179, 179);">&#xe662;</span>
  80. <ul>
  81. <li></li>
  82. </ul>
  83. </li>
  84. <li>
  85. <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;前端开发</a>
  86. <span class="iconfont" style="color:RGB(168, 179, 179);">&#xe662;</span>
  87. <ul>
  88. <li></li>
  89. </ul>
  90. </li>
  91. <li>
  92. <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;服务端开发</a>
  93. <span class="iconfont" style="color:RGB(168, 179, 179);">&#xe662;</span>
  94. <ul>
  95. <li></li>
  96. </ul>
  97. </li>
  98. <li>
  99. <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;移动开发</a>
  100. <span class="iconfont" style="color:RGB(168, 179, 179);">&#xe662;</span>
  101. <ul>
  102. <li></li>
  103. </ul>
  104. </li>
  105. <li>
  106. <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;数据库</a>
  107. <span class="iconfont" style="color:RGB(168, 179, 179);">&#xe662;</span>
  108. <ul>
  109. <li></li>
  110. </ul>
  111. </li>
  112. <li>
  113. <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;服务器运维&下载</a>
  114. <span class="iconfont" style="color:RGB(168, 179, 179);">&#xe662;</span>
  115. <ul>
  116. <li></li>
  117. </ul>
  118. </li>
  119. <li>
  120. <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;在线工具箱</a>
  121. <span class="iconfont" style="color:RGB(168, 179, 179);">&#xe662;</span>
  122. <ul>
  123. <li></li>
  124. </ul>
  125. </li>
  126. <li>
  127. <a href="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;常用类库</a>
  128. <span class="iconfont" style="color:RGB(168, 179, 179);">&#xe662;</span>
  129. <ul>
  130. <li></li>
  131. </ul>
  132. </li>
  133. </ul>
  134. </div>
  135. <!-- 轮播图右 -->
  136. <div class="lbright flexCompatible flexVertical">
  137. <ul class="flexCompatible flexAlignC">
  138. <li><a href="">PHP头条</a><span class="xin1"></span> </li>
  139. <li><a href="">孤独九剑</a></li>
  140. <li><a href="">学习路线</a><span class="xin1 xin2"></span></li>
  141. <li><a href="">在线工具</a></li>
  142. <li><a href="">趣味课堂</a><span class="xin1 xin3"></span></li>
  143. <li><a href="">社区问答</a></li>
  144. <li><a href="">课程直播</a></li>
  145. <div><input type="text" placeholder="&nbsp;&nbsp;输入关键词搜索"></div>
  146. </ul>
  147. <div class="lunbo">
  148. <img src="images/lunbo1.jpg" alt="">
  149. <span class="iconfont icon1 icon3">&#xe660;</span>
  150. <span class="iconfont icon2 icon3">&#xe662;</span>
  151. </div>
  152. <div class="lunboBottom flexCompatible flexContentV ">
  153. <img src="images/index_yunv.jpg" alt="">
  154. <img src="images/index_php_new4.jpg" alt="">
  155. <img src="images/index_php_item3.jpg" alt="">
  156. <img src="images/index_php_item2_.png" alt="">
  157. </div>
  158. </div>
  159. </div>
  160. <!-- 广告条 -->
  161. <div class="guanggao">
  162. <a href=""><img src="images/index_ad222.jpg" alt=""></a>
  163. </div>
  164. <!-- 头条,最新课程,常用手册 -->
  165. <div id="content2" class="flexCompatible flexShrinkFixed flexContentB">
  166. <!-- 头条 -->
  167. <div class="toutiao flexCompatible flexVertical flexAlignC">
  168. <div><h4>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">头条</a> </h4></div>
  169. <div>
  170. <ul>
  171. <li><a href="">php中文网原创视频:《天龙八部》公益php培训...</a></li>
  172. <li><a href="">php中文网《玉女心经》公益PHP培训系列...</a></li>
  173. <li><a href="">php的版本发展历史(1995-2020)</a></li>
  174. <li><a href="">您知道吗?最好的语言:PHP 25 岁了!</a></li>
  175. <li><a href="">史上最污技术解读,我竟然秒懂了</a></li>
  176. <li><a href="">2020年最新5个简洁优秀的个人博客模板免...</a></li>
  177. <li><a href="">5款优秀的vue后台管理系统模板推荐(免费...</a></li>
  178. <li><a href="">6个大气的bootstrap后台管理系统模板推荐...</a></li>
  179. <li><a href="">5款简洁的layui后台管理模板推荐(免费下载...</a></li>
  180. <li><a href="">5款个性的网页回到顶部特效代码</a></li>
  181. <li><a href="">小皮面板 v0.53 版本今日发布!</a></li>
  182. <li><a href="">phpstudy v8.1.0.4 版本今日发布!</a></li>
  183. </ul>
  184. </div>
  185. </div>
  186. <!-- 最新课程 -->
  187. <div class="kecheng flexCompatible flexVertical flexAlignC">
  188. <div><h4>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">最新课程</a> </h4></div>
  189. <div class="flexCompatible flexWrap flexContentC flexContentV">
  190. <a href="">
  191. <img src="images/kecheng1.jpg" alt="">
  192. <div><span>中级</span>&nbsp;&nbsp;PHP代码整洁之道 </div>
  193. </a>
  194. <a href="">
  195. <img src="images/kecheng2.png" alt="">
  196. <div><span>初级</span>&nbsp;&nbsp;前端课程(五郎八卦系列):第一棍</div>
  197. </a>
  198. <a href="">
  199. <img src="images/kecheng3.png" alt="">
  200. <div><span>初级</span>&nbsp;&nbsp;小皮面板使用视频教程 </div>
  201. </a>
  202. <a href="">
  203. <img src="images/kecheng4.jpg" alt="">
  204. <div><span>初级</span>&nbsp;&nbsp;从零进入C语言 </div>
  205. </a>
  206. <a href="">
  207. <img src="images/kecheng5.jpg" alt="">
  208. <div><span>中级</span>&nbsp;&nbsp;C语言进阶篇 </div>
  209. </a>
  210. <a href="">
  211. <img src="images/kecheng6.png" alt="">
  212. <div><span>中级</span>&nbsp;&nbsp;PHP快速操控Excel之PhpSpreadsheet </div>
  213. </a>
  214. </div>
  215. </div>
  216. <!-- 常用手册 -->
  217. <div class="shouce flexCompatible flexVertical flexAlignC">
  218. <div class="flexCompatible flexContentB flexContentC flexAlignC">
  219. <h4>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">常用手册</a> </h4><h3><a href="">更多</a> </h3>
  220. </div>
  221. <div class="flexCompatible flexVertical">
  222. <dd class="flexCompatible flexContentB flexAlignC">
  223. <li class="flexCompatible flexAlignC flexContentC"><img src="images/shouce1.jpg" alt=""></li>
  224. <li class="flexCompatible flexVertical flexContentC">
  225. <a href="">php手册Linux手册</a>
  226. <a href="">ThinkPHP6.0CI手册大全</a>
  227. </li>
  228. </dd>
  229. <dd class="flexCompatible flexContentB flexAlignC">
  230. <li class="flexCompatible flexAlignC flexContentC"><img src="images/shouce2.jpg" alt=""></li>
  231. <li class="flexCompatible flexVertical flexContentC">
  232. <a href="">JavaScript中文参考手册</a>
  233. <a href="">jQuery手册大全</a>
  234. </li>
  235. </dd>
  236. <dd class="flexCompatible flexContentB flexAlignC">
  237. <li class="flexCompatible flexAlignC flexContentC"><img src="images/shouce3.jpg" alt=""></li>
  238. <li class="flexCompatible flexVertical flexContentC">
  239. <a href="">MySQL参考手册大全</a>
  240. <a href="">laravel5.8速查表</a>
  241. </li>
  242. </dd>
  243. <dd class="flexCompatible flexContentB flexAlignC">
  244. <li class="flexCompatible flexAlignC flexContentC"><img src="images/shouce4.jpg" alt=""></li>
  245. <li class="flexCompatible flexVertical flexContentC">
  246. <a href="">Python参考手册大全</a>
  247. <a href="">Node.js中文学习手册</a>
  248. </li>
  249. </dd>
  250. <dd class="flexCompatible flexContentB flexAlignC">
  251. <li class="flexCompatible flexAlignC flexContentC"><img src="images/shouce5.jpg" alt=""></li>
  252. <li class="flexCompatible flexVertical flexContentC">
  253. <a href="">html手册CSS手册</a>
  254. <a href="">AngularJSAjax手册</a>
  255. </li>
  256. </dd>
  257. <dd class="flexCompatible flexContentB flexAlignC">
  258. <li class="flexCompatible flexAlignC flexContentC"><img src="images/shouce6.jpg" alt=""></li>
  259. <li class="flexCompatible flexVertical flexContentC">
  260. <a href="">ASP参考手册大全</a>
  261. <a href="">Bootstrap3参考手册</a>
  262. </li>
  263. </dd>
  264. </div>
  265. </div> <!-- 常用手册结束 -->
  266. </div> <!-- 头条,最新课程,常用手册结束 -->
  267. <!-- 技术文章,网站源码,原生手册,推荐博文 -->
  268. <div id="content3" class="flexCompatible flexShrinkFixed flexContentB">
  269. <div class="left flexCompatible flexVertical">
  270. <div class="lunbo2">
  271. <a href="">
  272. <img src="images/急速入门.jpg" alt="">
  273. <div class="flexCompatible flexLeve flexAlignC">
  274. <h3>&nbsp;&nbsp;&nbsp;&nbsp;PHPStudy急速入门视频教程</h3>
  275. <span></span>
  276. <span></span>
  277. <span></span>
  278. </div>
  279. </a>
  280. </div>
  281. <ul class="flexCompatible flexVertical flexAlignC flexContentC">
  282. <li class="flexCompatible flexAlignC flexContentB"><h4>&nbsp;&nbsp;php开发辅助工具下载</h4><a href="">更多&gt;&gt;</a></li>
  283. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>小皮面板(phpStudy for Linux 服务器运维管理</a><span>01-17</span></li>
  284. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>VSCode Windows 64位 下载</a><span>01-16</span></li>
  285. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>Memcached Win64位系统 1.4.4版本</a><span>10-26</span></li>
  286. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>Memcached Win32位系统 1.4.4版本</a><span>10-26</span></li>
  287. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>Memcached Win64位系统 1.4.5版本</a><span>10-26</span></li>
  288. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>Memcached Win32位系统 1.4.5版本</a><span>10-26</span></li>
  289. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>phpstudy安全自检修复程序</a><span>09-23</span></li>
  290. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>phpStudy V8.1(Win64位)</a><span>08-05</span></li>
  291. <li><a href=""><span>&bull;&nbsp;&nbsp;</span>phpStudy V8.1(Win32位)</a><span>08-05</span></li>
  292. </ul>
  293. </div>
  294. <div class="middle" class="flexCompatible flexVertical">
  295. <div>
  296. <ul class="flexCompatible flexAlignC">
  297. <li><span>技术文章</span> </li>
  298. <li><span>网站源码</span></li>
  299. <li><span>原生手册</span></li>
  300. <li><span>推荐博文</span></li>
  301. </ul>
  302. </div>
  303. <div>
  304. <ul class="flexCompatible flexVertical flexContentC">
  305. <li><a href=""><span>php教程</span><span>什么是波兰式?</span></a><span>06-25</span></li>
  306. <li><a href=""><span>PHP7</span><span>学习PHP7的革新与性能优化</span></a><span>06-24</span></li>
  307. <li><a href=""><span>Mysql教程</span><span>mysql中char表示什么意思</span></a><span>06-24</span></li>
  308. <li><a href=""><span>Laravel</span><span>Laravel如何包含自己的助手函数?</span></a><span>06-24</span></li>
  309. <li><a href=""><span>ThinkPHP</span><span>ThinkPHP6.0多语言优化扩展包的安装与使用</span></a><span>06-24</span></li>
  310. <li><a href=""><span>css教程</span><span>css新增伪类有哪些</span></a><span>06-24</span></li>
  311. <li><a href=""><span>js教程</span><span>ES6 Generator基本使用</span></a><span>06-24</span></li>
  312. <li><a href=""><span>Redis</span><span>Redis集群中的节点分为哪两个?</span></a><span>06-23</span></li>
  313. <li><a href=""><span>小程序开发</span><span>什么是骨架屏(Skeleton Screen)?</span></a><span>06-23</span></li>
  314. <li><a href=""><span>Python教程</span><span>Python 如何自定义模块?</span></a><span>06-23</span></li>
  315. <li><a href=""><span>Python教程</span><span>Python 的 help 函数使用</span></a><span>06-23</span></li>
  316. <li><a href=""><span>Java基础</span><span>Java Reactor 反应器模式</span></a><span>06-23</span></li>
  317. <li><a href=""><span>C#.Net教程</span><span>C++语言标识符的命名规则是什么?</span></a><span>06-23</span></li>
  318. <li><a href=""><span>GolangGo</span><span>Wails 框架构建桌面应用示例</span></a><span>06-22</span></li>
  319. <li><a href=""><span>Docker</span><span>docker是什么?有什么作用?</span></a><span>06-22</span></li>
  320. <li><a href=""><span>PHP问题</span><span>PHP中 fsockopen 函数怎么用?</span></a><span>06-22</span></li>
  321. <li><a href=""><span>Apache</span><span>如何在centos下安装apache</span></a><span>06-20</span></li>
  322. <li><a href=""><span>Nginxnginx</span><span>实现负载均衡有哪几个模式</span></a><span>06-20</span></li>
  323. </ul>
  324. </div>
  325. </div>
  326. <div class="right flexCompatible flexVertical flexAlignC">
  327. <div><a href="">&nbsp;&nbsp;&nbsp;&nbsp;最新社区问答</a></div>
  328. <ul>
  329. <li><a href="">请问jQuery按手机返回键后,不回退回页面...</a></li>
  330. <li><a href="">PHP7 编译安装 扩展相关问题</a></li>
  331. <li><a href="">90%22=2 这个是怎么个模法?</a></li>
  332. <li><a href="">页面中iframe内元素点击</a></li>
  333. <li><a href="">朱老师, 这个地方按你的分类列表出不来...</a></li>
  334. <li><a href="">朱老师,第6章后是不是还有内容啊</a></li>
  335. <li><a href="">发帖后,再进行修改,帖子时间是第一次的...</a></li>
  336. <li><a href="">think目录下没有Db目录</a></li>
  337. <li><a href="">只能访问index,不能访问hello</a></li>
  338. <li><a href="">编辑页面出不来</a></li>
  339. <li><a href="">关键词打开网站很慢怎么解决</a></li>
  340. <li><a href="">登录不能跳转到后台</a></li>
  341. <li><a href="">访问中心服务器错误</a></li>
  342. <li><a href="">phpcom后台保存远程图片的问题</a></li>
  343. <li><a href="">http://www.phpcms.cn/网站倒闭</a></li>
  344. <li><a href="">pdo_mysql开启与关闭有什么影响?</a></li>
  345. <li><a href="">出错了</a></li>
  346. <li><a href="">最新ThinkPHP 5.1全球首发视频教程(60...</a></li>
  347. </ul>
  348. </div>
  349. </div>
  350. <!-- 技术文章,网站源码,原生手册,推荐博文结束 -->
  351. <!-- 广告条2 -->
  352. <div class="guanggao2">
  353. <a href=""><img src="images/广告2.jpg" alt=""></a>
  354. </div>
  355. <!-- 广告条2结束 -->
  356. <!-- 编程词典开始 -->
  357. <div id="content4" class="flexCompatible flexShrinkFixed flexContentB">
  358. <div class="left flexCompatible flexVertical">
  359. <div><span>词典分类</span></div>
  360. <ul class="flexCompatible flexVertical flexAlignE">
  361. <li>
  362. <a href="">
  363. <span class="iconfont icon-daima2"></span>
  364. <span>HTML/CSS</span>
  365. <span>HTML/CSS</span>
  366. </a>
  367. </li>
  368. <li>
  369. <a href="">
  370. <span class="iconfont icon-daima2"></span>
  371. <span>JavaScript</span>
  372. <span>JavaScript</span>
  373. </a>
  374. </li>
  375. <li>
  376. <a href="">
  377. <span class="iconfont icon-daima2"></span>
  378. <span>服务端</span>
  379. <span>服务端</span>
  380. </a>
  381. </li>
  382. <li>
  383. <a href="">
  384. <span class="iconfont icon-daima2"></span>
  385. <span>数据端</span>
  386. <span>数据端</span>
  387. </a>
  388. </li>
  389. <li>
  390. <a href="">
  391. <span class="iconfont icon-daima2"></span>
  392. <span>移动端</span>
  393. <span>移动端</span>
  394. </a>
  395. </li>
  396. <li>
  397. <a href="">
  398. <span class="iconfont icon-daima2"></span>
  399. <span>XML</span>
  400. <span>XML</span>
  401. </a>
  402. </li>
  403. <li>
  404. <a href="">
  405. <span class="iconfont icon-daima2"></span>
  406. <span>ASP.NET</span>
  407. <span>ASP.NET</span>
  408. </a>
  409. </li>
  410. <li>
  411. <a href="">
  412. <span class="iconfont icon-daima2"></span>
  413. <span>Web Services</span>
  414. <span>Web Services</span>
  415. </a>
  416. </li>
  417. <li>
  418. <a href="">
  419. <span class="iconfont icon-daima2"></span>
  420. <span>开发工具</span>
  421. <span>开发工具</span>
  422. </a>
  423. </li>
  424. <li>
  425. <a href="">
  426. <span class="iconfont icon-daima2"></span>
  427. <span>网站建设</span>
  428. <span>网站建设</span>
  429. </a>
  430. </li>
  431. </ul>
  432. </div>
  433. <div class="right flexCompatible flexVertical">
  434. <ul class="flexCompatible flexAlignC">
  435. <li>词典查询</li>
  436. <li>全部词典</li>
  437. <li>最近更新</li>
  438. </ul>
  439. <div class="flexCompatible flexVertical">
  440. <div class="flexCompatible flexVertical flexAlignC">
  441. <a href=""><h1>编程词典</h1></a>
  442. <span>服务码农的在线技术手册</span>
  443. </div>
  444. <div class="flexCompatible flexContentC">
  445. <span class="iconfont">&#xe63c;</span>
  446. <input type="text">
  447. <button>搜索</button>
  448. </div>
  449. <div class="flexCompatible flexAlignC">
  450. <span>热门搜索:</span>
  451. <a href="">PHP</a>
  452. <a href="">MySQL</a>
  453. <a href="">jQuery</a>
  454. <a href="">HTML</a>
  455. <a href="">CSS</a>
  456. </div>
  457. <div>
  458. <span>历史搜索:</span>
  459. </div>
  460. </div>
  461. </div>
  462. </div>
  463. <!-- 编程词典结束 -->
  464. <!-- php入门精品课程开始 -->
  465. <div class="content5 flexCompatible flexVertical flexShrinkFixed">
  466. <div class="flexCompatible flexVertical">
  467. <div class="top flexCompatible flexContentC flexAlignC">
  468. <span class="iconfont icon-daima2"></span>
  469. <h2>PHP入门精品课程</h2>
  470. <span class="iconfont icon-daima2"></span>
  471. </div>
  472. <div class="bottom flexCompatible">
  473. <ul class="flexCompatible flexVertical flexAlignC">
  474. <li><img src="images/入门精品课程.jpg" alt=""></li>
  475. <li>
  476. <a href="" class="tupian">
  477. <img src="images/t1.jpg" alt="">
  478. <div>
  479. <div class="flexCompatible flexContentC flexAlignC">
  480. <span class="span1">中级</span>
  481. <span>ThinkPHP6.0极速入门</span>
  482. </div>
  483. <div><span class="span2">4W+次播放</span></div>
  484. </div>
  485. </a>
  486. </li>
  487. </ul>
  488. <ul class="flexCompatible flexWrap flexContentV flexAlignC">
  489. <li>
  490. <a href="">
  491. <img src="images/t2.png" alt="">
  492. <div>
  493. <div class="flexCompatible flexContentC flexAlignC">
  494. <span class="span1">初级</span>
  495. <span>编程学习方法分享直播</span>
  496. </div>
  497. <div><span class="span2">1W+次播放</span></div>
  498. </div>
  499. </a>
  500. </li>
  501. <li>
  502. <a href="">
  503. <img src="images/t3.jpg" alt="">
  504. <div>
  505. <div class="flexCompatible flexContentC flexAlignC">
  506. <span class="span1">初级</span>
  507. <span>2018前端入门_HTML5</span>
  508. </div>
  509. <div><span class="span2">18W+次播放</span></div>
  510. </div>
  511. </a>
  512. </li>
  513. <li>
  514. <a href="">
  515. <img src="images/t4.jpg" alt="">
  516. <div>
  517. <div class="flexCompatible flexContentC flexAlignC">
  518. <span class="span1">中级</span>
  519. <span>CSS视频教程-玉女心经</span>
  520. </div>
  521. <div><span class="span2">10W+次播放</span></div>
  522. </div>
  523. </a>
  524. </li>
  525. <li>
  526. <a href="">
  527. <img src="images/t5.jpg" alt="">
  528. <div>
  529. <div class="flexCompatible flexContentC flexAlignC">
  530. <span class="span1">初级</span>
  531. <span>JavaScript极速入门</span>
  532. </div>
  533. <div><span class="span2">18W+次播放</span></div>
  534. </div>
  535. </a>
  536. </li>
  537. <li>
  538. <a href="">
  539. <img src="images/t6.jpg" alt="">
  540. <div>
  541. <div class="flexCompatible flexContentC flexAlignC">
  542. <span class="span1">中级</span>
  543. <span>孤独九剑(6)_jQuery</span>
  544. </div>
  545. <div><span class="span2">12W+次播放</span></div>
  546. </div>
  547. </a>
  548. </li>
  549. <li>
  550. <a href="">
  551. <img src="images/t7.jpeg" alt="">
  552. <div>
  553. <div class="flexCompatible flexContentC flexAlignC">
  554. <span class="span1">初级</span>
  555. <span>30分钟学会网站布局</span>
  556. </div>
  557. <div><span class="span2">6W+次播放</span></div>
  558. </div>
  559. </a>
  560. </li>
  561. <li>
  562. <a href="">
  563. <img src="images/t8.jpg" alt="">
  564. <div>
  565. <div class="flexCompatible flexContentC flexAlignC">
  566. <span class="span1">初级</span>
  567. <span>[公益直播课]Web前端</span>
  568. </div>
  569. <div><span class="span2">5W+次播放</span></div>
  570. </div>
  571. </a>
  572. </li>
  573. <li>
  574. <a href="">
  575. <img src="images/t9.jpg" alt="">
  576. <div>
  577. <div class="flexCompatible flexContentC flexAlignC">
  578. <span class="span1">初级</span>
  579. <span>phpSyudy极速入门视频</span>
  580. </div>
  581. <div><span class="span2">40W+次播放</span></div>
  582. </div>
  583. </a>
  584. </li>
  585. <li>
  586. <a href="">
  587. <img src="images/t10.jpg" alt="">
  588. <div>
  589. <div class="flexCompatible flexContentC flexAlignC">
  590. <span class="span1">中级</span>
  591. <span>孤独九剑(4)_PHP视频</span>
  592. </div>
  593. <div><span class="span2">50W+次播放</span></div>
  594. </div>
  595. </a>
  596. </li>
  597. <li>
  598. <a href="">
  599. <img src="images/t11.jpg" alt="">
  600. <div>
  601. <div class="flexCompatible flexContentC flexAlignC">
  602. <span class="span1">初级</span>
  603. <span>php完全自学手册</span>
  604. </div>
  605. <div><span class="span2">20W+次播放</span></div>
  606. </div>
  607. </a>
  608. </li>
  609. <li>
  610. <a href="">
  611. <img src="images/t12.jpg" alt="">
  612. <div>
  613. <div class="flexCompatible flexContentC flexAlignC">
  614. <span class="span1">初级</span>
  615. <span>MySQL权威开发指南</span>
  616. </div>
  617. <div><span class="span2">2W+次播放</span></div>
  618. </div>
  619. </a>
  620. </li>
  621. <li>
  622. <a href="">
  623. <img src="images/t13.jpg" alt="">
  624. <div>
  625. <div class="flexCompatible flexContentC flexAlignC">
  626. <span class="span1">中级</span>
  627. <span>[公益直播课]php实战</span>
  628. </div>
  629. <div><span class="span2">3W+次播放</span></div>
  630. </div>
  631. </a>
  632. </li>
  633. </ul>
  634. </div>
  635. </div>
  636. </div>
  637. <!-- php入门精品课程结束 -->
  638. <!-- 尾部开始 -->
  639. <footer class="flexCompatible flexShrinkFixed flexContentC flexAlignC">
  640. <div class="bottom flexCompatible">
  641. <dd>
  642. <li>
  643. <a href="">网站首页</a>
  644. <a href="">PHP视频</a>
  645. <a href="">PHP实战</a>
  646. <a href="">PHP代码</a>
  647. <a href="">PHP手册</a>
  648. <a href="">词条</a>
  649. <a href="">手记</a>
  650. <a href="">编程词典</a>
  651. </li>
  652. <li>
  653. <span>php中文网:公益在线php培训,帮助PHP学习者快速成长!</span>
  654. <img src="images/行业认证.png" alt="">
  655. <span>合肥彼岸互联信息技术有限公司</span>
  656. </li>
  657. <li>
  658. <span>Copyright 2014-2020 https://www.php.cn/ All Rights Reserved | 皖B2-20150071-9</span>
  659. <span><img src="images/foot_line.gif" alt="">&nbsp;&nbsp;&nbsp;&nbsp; 皖公网安备 34010402701654号 <img src="images/foot_line.gif" alt=""></span>
  660. <span>
  661. <a href="">关于我们</a>
  662. <a href="">负责申明</a>
  663. <a href="">赞助与捐赠</a>
  664. <a href="">广告合作</a>
  665. </span>
  666. </li>
  667. <li><span>座机号码:0551-64933227 安徽省合肥市政务新区置地广场D座2101</span> </li>
  668. </dd>
  669. <div>
  670. <img src="images/二维码群.png" alt="">
  671. <img src="images/php二维码.jpg" alt="">
  672. </div>
  673. </div>
  674. </footer>
  675. <!-- 尾部结束 -->
  676. </body>
  677. </html>
  • css代码:
  1. .iconfont {
  2. font-family: "iconfont" !important;
  3. font-size: 25px;
  4. font-style: normal;
  5. -webkit-font-smoothing: antialiased;
  6. -moz-osx-font-smoothing: grayscale;
  7. }
  8. body {
  9. display: flex;
  10. flex-direction: column;
  11. align-items: center;
  12. }
  13. header {
  14. width: 100%;
  15. }
  16. header > ul {
  17. height: 60px;
  18. background: #000; /*导航条背景*/
  19. }
  20. header > ul > li:first-of-type {
  21. width: 140px; /*logo图片php中文网*/
  22. height: 60px;
  23. }
  24. header > ul img {
  25. width: 100%;
  26. height: 100%;
  27. }
  28. header > ul > li:not(:first-of-type) {
  29. height: 60px; /*除了第一个li剩下的li元素*/
  30. text-align: center;
  31. line-height: 60px;
  32. margin-left: 20px;
  33. width: 96px;
  34. position: relative;
  35. }
  36. header > ul > li:not(:first-of-type):hover {
  37. border-bottom: 5px solid RGB(95, 184, 120);
  38. }
  39. header > ul a {
  40. /*链接字体颜色*/
  41. color: RGB(168, 179, 179);
  42. }
  43. header > ul > div:last-of-type {
  44. margin-left: auto; /*登录注册的位置*/
  45. }
  46. header > ul > div:last-of-type a {
  47. width: 60px; /*登录注册的大小*/
  48. height: 60px;
  49. line-height: 60px;
  50. text-align: center;
  51. }
  52. header > ul > div:last-of-type a:hover {
  53. background: RGB(54, 60, 65);
  54. }
  55. header > ul > li:nth-of-type(2) {
  56. width: 68px;
  57. height: 60px;
  58. background: RGB(54, 60, 65);
  59. }
  60. header .xin {
  61. background: RGB(255, 87, 34);
  62. color: #fff;
  63. font-size: 13px;
  64. display: inline-block;
  65. width: 18px;
  66. height: 18px;
  67. position: absolute;
  68. top: 3px;
  69. border-radius: 2px;
  70. line-height: normal;
  71. }
  72. header .yd {
  73. line-height: normal;
  74. position: absolute;
  75. top: 14px;
  76. color: RGB(255, 87, 34);
  77. }
  78. header .show {
  79. width: 200px;
  80. height: 200px;
  81. background: #fff;
  82. box-shadow: 0 0 3px #888888;
  83. padding: 0;
  84. position: absolute;
  85. top: 60px;
  86. display: none;
  87. z-index: 99;
  88. }
  89. header .show1 {
  90. height: 160px;
  91. }
  92. header .show li,
  93. header .show1 li {
  94. width: 90px;
  95. height: 34px;
  96. text-align: center;
  97. line-height: 34px;
  98. padding: 0;
  99. margin: 5px 5px 0 5px;
  100. float: left;
  101. }
  102. header > ul > li > ul > li > a {
  103. color: RGB(51, 51, 51);
  104. }
  105. header > ul > li:hover .show {
  106. display: block;
  107. }
  108. header .show li:hover {
  109. background: RGB(242, 242, 242);
  110. }
  111. /* 轮播部分 */
  112. #content1 {
  113. width: 1200px;
  114. height: 510px;
  115. box-shadow: 0 0 5px #888888;
  116. margin-top: 35px;
  117. border-radius: 10px;
  118. }
  119. #content1 > .lbleft {
  120. width: 216px;
  121. height: 510px;
  122. background: RGB(43, 51, 59);
  123. border-radius: 10px 0 0 10px;
  124. }
  125. #content1 > .lbright {
  126. width: 984px;
  127. height: 510px;
  128. border-radius: 0 10px 10px 0;
  129. }
  130. #content1 > .lbleft > ul {
  131. margin-top: 15px;
  132. }
  133. #content1 > .lbleft > ul > li {
  134. width: 216px;
  135. height: 60px;
  136. line-height: 60px;
  137. display: flex;
  138. justify-content: start;
  139. }
  140. #content1 > .lbleft > ul > li > span {
  141. margin-left: auto;
  142. margin-right: 10px;
  143. }
  144. #content1 > .lbleft > ul > li > a {
  145. color: RGB(168, 179, 179);
  146. }
  147. #content1 > .lbleft > ul > li:hover {
  148. background: RGB(107, 113, 118);
  149. cursor: pointer;
  150. }
  151. #content1 > .lbright > ul {
  152. width: 984px;
  153. height: 60px;
  154. border-radius: 0 10px 0 0;
  155. }
  156. #content1 > .lbright > ul > li {
  157. width: 80px;
  158. height: 60px;
  159. margin-left: 15px;
  160. text-align: center;
  161. line-height: 60px;
  162. }
  163. #content1 > .lbright > ul > li > a {
  164. color: RGB(52, 51, 51);
  165. }
  166. #content1 > .lbright > ul > li > a:hover {
  167. color: RGB(149, 150, 149);
  168. }
  169. #content1 > .lbright > ul > div:last-of-type {
  170. margin-left: auto;
  171. margin-right: 20px;
  172. width: 260px;
  173. height: 40px;
  174. }
  175. #content1 > .lbright > ul > div:last-of-type input {
  176. width: 100%;
  177. height: 100%;
  178. border-radius: 5px;
  179. border: 0;
  180. outline: none;
  181. background: RGB(241, 240, 240);
  182. }
  183. #content1 > .lbright > ul .xin1 {
  184. background: RGB(255, 87, 34);
  185. color: #fff;
  186. font-size: 13px;
  187. display: inline-block;
  188. width: 18px;
  189. height: 18px;
  190. border-radius: 2px;
  191. line-height: normal;
  192. margin-left: 2px;
  193. }
  194. #content1 > .lbright > ul .xin2 {
  195. background: RGB(47, 64, 86);
  196. }
  197. #content1 > .lbright > ul .xin3 {
  198. background: RGB(255, 184, 0);
  199. }
  200. #content1 > .lbright > .lunbo {
  201. width: 984px;
  202. height: 330px;
  203. background: lightgreen;
  204. position: relative;
  205. }
  206. #content1 > .lbright > .lunbo img {
  207. width: 100%;
  208. height: 100%;
  209. }
  210. #content1 > .lbright > .lunbo .icon1 {
  211. font-size: 40px;
  212. width: 45px;
  213. height: 45px;
  214. border-radius: 50%;
  215. background: rgba(0, 0, 0, 0.2);
  216. color: #fff;
  217. cursor: pointer;
  218. position: absolute;
  219. top: 48%;
  220. left: 0;
  221. }
  222. #content1 > .lbright > .lunbo .icon2 {
  223. font-size: 40px;
  224. width: 45px;
  225. height: 45px;
  226. border-radius: 50%;
  227. background: rgba(0, 0, 0, 0.2);
  228. color: #fff;
  229. cursor: pointer;
  230. position: absolute;
  231. top: 48%;
  232. right: 0;
  233. }
  234. #content1 > .lbright > .lunbo .icon3:hover {
  235. background: rgba(0, 0, 0, 0.4);
  236. }
  237. #content1 > .lbright > .lunboBottom {
  238. width: 984px;
  239. height: 105px;
  240. }
  241. #content1 > .lbright > .lunboBottom img {
  242. width: 236px;
  243. height: 90px;
  244. margin-top: 15px;
  245. border-radius: 10px;
  246. }
  247. .guanggao {
  248. width: 1200px;
  249. height: 100px;
  250. }
  251. .guanggao img {
  252. width: 1200px;
  253. height: 80px;
  254. border-radius: 10px;
  255. margin-top: 20px;
  256. }
  257. #content2 {
  258. width: 1200px;
  259. height: 446px;
  260. }
  261. #content2 .toutiao {
  262. height: 416px;
  263. width: 300px;
  264. }
  265. #content2 .kecheng {
  266. width: 620px;
  267. height: 416px;
  268. }
  269. #content2 .shouce {
  270. width: 260px;
  271. height: 416px;
  272. }
  273. #content2 .toutiao,
  274. #content2 .kecheng,
  275. #content2 .shouce {
  276. margin-top: 30px;
  277. border-radius: 10px;
  278. box-shadow: 0 0 3px #888888;
  279. }
  280. #content2 .toutiao div:first-of-type {
  281. width: 280px;
  282. height: 36px;
  283. color: RGB(52, 53, 53);
  284. line-height: 36px;
  285. border-bottom: 1px dotted #bbb;
  286. }
  287. #content2 .toutiao div:first-of-type a {
  288. color: RGB(52, 53, 53);
  289. }
  290. #content2 .toutiao div:last-of-type {
  291. width: 280px;
  292. height: 338px;
  293. }
  294. #content2 .toutiao div:last-of-type li {
  295. width: 100%;
  296. height: 19px;
  297. display: flex;
  298. flex-wrap: nowrap;
  299. flex: 0;
  300. margin-top: 9px;
  301. }
  302. #content2 .toutiao div:last-of-type li a {
  303. font-size: 13px;
  304. color: RGB(51, 51, 51);
  305. letter-spacing: 0px;
  306. }
  307. #content2 .toutiao div:last-of-type li a:hover {
  308. color: #888888;
  309. }
  310. #content2 .kecheng div:first-of-type {
  311. width: 580px;
  312. height: 36px;
  313. color: RGB(52, 53, 53);
  314. line-height: 36px;
  315. border-bottom: 1px dotted #bbb;
  316. }
  317. #content2 .kecheng div:first-of-type a {
  318. color: RGB(52, 53, 53);
  319. }
  320. #content2 .kecheng div:last-of-type {
  321. width: 580px;
  322. height: 338px;
  323. }
  324. #content2 .kecheng div:last-of-type a {
  325. width: 172px;
  326. height: 140px;
  327. display: flex;
  328. flex-flow: column nowrap;
  329. margin-top: 20px;
  330. box-shadow: 0 0 5px #888888;
  331. border-radius: 5px;
  332. }
  333. #content2 .kecheng div:last-of-type a img {
  334. width: 172px;
  335. height: 90px;
  336. border-radius: 5px 5px 0 0;
  337. }
  338. #content2 .kecheng div:last-of-type a div {
  339. width: 172px;
  340. height: 65px;
  341. margin-top: -15px;
  342. border-radius: 5px;
  343. background: #fff;
  344. z-index: 99;
  345. }
  346. #content2 .kecheng div:last-of-type a div {
  347. color: RGB(52, 53, 53);
  348. font-size: 15px;
  349. line-height: 20px;
  350. padding: 10px;
  351. }
  352. #content2 .kecheng div:last-of-type a div:hover {
  353. color: #888;
  354. }
  355. #content2 .kecheng div:last-of-type a div span:first-of-type {
  356. background: RGB(147, 153, 159);
  357. color: #fff;
  358. margin-top: -5px;
  359. margin-left: 10px;
  360. font-size: 12px;
  361. line-height: 20px;
  362. }
  363. #content2 .shouce a {
  364. color: RGB(52, 53, 53);
  365. }
  366. #content2 .shouce > div:first-of-type {
  367. width: 230px;
  368. height: 36px;
  369. border-bottom: 1px dotted #bbb;
  370. }
  371. #content2 .shouce > div:last-of-type {
  372. width: 230px;
  373. height: 330px;
  374. }
  375. #content2 .shouce > div:last-of-type > dd {
  376. width: 230px;
  377. height: 55px;
  378. }
  379. #content2 .shouce > div:last-of-type > dd > li:first-of-type {
  380. width: 50px;
  381. height: 55px;
  382. }
  383. #content2 .shouce > div:last-of-type img {
  384. width: 40px;
  385. height: 40px;
  386. }
  387. #content2 .shouce > div:last-of-type > dd > li:last-of-type {
  388. height: 55px;
  389. width: 160px;
  390. }
  391. #content2 .shouce > div:last-of-type > dd > li:last-of-type a:hover {
  392. color: #888;
  393. }
  394. /*技术文章,网站源码,原生手册,推荐博文*/
  395. #content3 {
  396. width: 1200px;
  397. height: 515px;
  398. }
  399. #content3 > .left {
  400. width: 360px;
  401. height: 500px;
  402. }
  403. #content3 > .left .lunbo2 {
  404. width: 360px;
  405. height: 187px;
  406. border-radius: 5px;
  407. background: #fff;
  408. box-shadow: 0 0 5px #888;
  409. position: relative;
  410. }
  411. #content3 > .left .lunbo2 img {
  412. width: 356px;
  413. height: 183px;
  414. border-radius: 5px;
  415. margin: 2px 2px;
  416. }
  417. #content3 > .left .lunbo2 a div:last-of-type {
  418. width: 360px;
  419. height: 26px;
  420. position: absolute;
  421. bottom: 2px;
  422. left: 2px;
  423. z-index: 99;
  424. }
  425. #content3 > .left .lunbo2 a div:last-of-type h3 {
  426. display: block;
  427. width: 290px;
  428. height: 26px;
  429. background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 1));
  430. color: #fff;
  431. line-height: 26px;
  432. border-radius: 0 0 0 5px;
  433. }
  434. #content3 > .left .lunbo2 a div:last-of-type span {
  435. display: block;
  436. width: 10px;
  437. height: 10px;
  438. background: rgba(0, 0, 0, 0.7);
  439. margin-left: 8px;
  440. }
  441. #content3 > .left .lunbo2 a div:last-of-type span:first-of-type {
  442. background: RGB(250, 155, 31);
  443. }
  444. #content3 > .left > ul {
  445. width: 360px;
  446. height: 300px;
  447. margin-top: 13px;
  448. padding: 0;
  449. border-radius: 5px;
  450. box-shadow: 0 0 5px #888888;
  451. }
  452. #content3 > .left > ul > li:first-of-type {
  453. width: 360px;
  454. height: 35px;
  455. }
  456. #content3 > .left > ul > li:first-of-type a {
  457. margin-right: 10px;
  458. font-size: 12px;
  459. color: RGB(51, 51, 51);
  460. }
  461. #content3 > .left > ul > li:not(:first-of-type) {
  462. width: 350px;
  463. height: 28px;
  464. line-height: 28px;
  465. display: flex;
  466. justify-content: space-between;
  467. align-items: center;
  468. }
  469. #content3 > .left > ul > li:not(:first-of-type) a {
  470. color: RGB(51, 51, 51);
  471. }
  472. #content3 > .left > ul > li:not(:first-of-type) a:hover {
  473. color: RGB(153, 153, 153);
  474. }
  475. #content3 > .left > ul > li:not(:first-of-type) span {
  476. color: RGB(153, 153, 153);
  477. }
  478. #content3 > .middle {
  479. width: 508px;
  480. height: 500px;
  481. box-shadow: 0 0 5px #888888;
  482. border-radius: 5px;
  483. }
  484. #content3 > .middle > div:first-of-type {
  485. width: 508px;
  486. height: 36px;
  487. border-bottom: 1px solid RGB(234, 234, 234);
  488. }
  489. #content3 > .middle > div:first-of-type ul li {
  490. width: 90px;
  491. height: 36px;
  492. line-height: 36px;
  493. text-align: center;
  494. }
  495. #content3 > .middle > div:first-of-type ul li span {
  496. width: 60px;
  497. display: block;
  498. height: 36px;
  499. margin: 0 15px;
  500. color: RGB(51, 51, 51);
  501. }
  502. #content3 > .middle > div:first-of-type ul li span:hover {
  503. border-bottom: 2px solid RGB(255, 74, 0);
  504. cursor: pointer;
  505. }
  506. #content3 > .middle > div:last-of-type {
  507. width: 508px;
  508. height: 464px;
  509. margin-top: 8px;
  510. }
  511. #content3 > .middle > div:last-of-type ul li {
  512. width: 508px;
  513. height: 25px;
  514. display: flex;
  515. justify-content: space-between;
  516. }
  517. #content3 > .middle > div:last-of-type ul li a {
  518. display: flex;
  519. line-height: 25px;
  520. }
  521. #content3 > .middle > div:last-of-type ul li a span:first-of-type {
  522. color: RGB(153, 153, 153);
  523. border-right: 1px solid RGB(204, 204, 204);
  524. width: 90px;
  525. height: 20px;
  526. margin-left: 10px;
  527. }
  528. #content3 > .middle > div:last-of-type ul li a span:last-of-type {
  529. color: RGB(51, 51, 51);
  530. margin-left: 20px;
  531. font-size: 14px;
  532. }
  533. #content3 > .middle > div:last-of-type ul li a span:last-of-type:hover {
  534. color: RGB(153, 153, 153);
  535. }
  536. #content3 > .middle > div:last-of-type ul li > span {
  537. color: RGB(245, 92, 11);
  538. margin-right: 10px;
  539. line-height: 25px;
  540. }
  541. #content3 > .right {
  542. width: 310px;
  543. height: 500px;
  544. border-radius: 5px;
  545. box-shadow: 0 0 5px #888888;
  546. }
  547. #content3 > .right a {
  548. color: RGB(51, 51, 51);
  549. }
  550. #content3 > .right > div {
  551. width: 310px;
  552. height: 36px;
  553. line-height: 36px;
  554. border-bottom: 1px solid RGB(234, 234, 234);
  555. }
  556. #content3 > .right > ul {
  557. margin-top: 8px;
  558. }
  559. #content3 > .right > ul li {
  560. width: 290px;
  561. height: 25px;
  562. }
  563. #content3 > .right > ul li a {
  564. font-size: 14px;
  565. line-height: 25px;
  566. }
  567. #content3 > .right > ul li a:hover {
  568. color: RGB(153, 153, 153);
  569. }
  570. #content3 > .left,
  571. #content3 > .middle,
  572. #content3 > .right {
  573. margin-top: 15px;
  574. }
  575. .guanggao2 {
  576. width: 1200px;
  577. height: 100px;
  578. }
  579. .guanggao2 > a img {
  580. width: 1200px;
  581. height: 80px;
  582. margin-top: 20px;
  583. border-radius: 10px;
  584. }
  585. /* 编程词典 */
  586. #content4 {
  587. width: 1200px;
  588. height: 410px;
  589. }
  590. #content4 > .left {
  591. width: 232px;
  592. height: 390px;
  593. margin-top: 20px;
  594. }
  595. #content4 > .left > div:first-of-type {
  596. width: 231px;
  597. height: 40px;
  598. background: RGB(238, 238, 238);
  599. color: RGB(102, 102, 102);
  600. line-height: 40px;
  601. border-radius: 10px 0 0 0;
  602. }
  603. #content4 > .left > div:first-of-type span {
  604. margin-left: 10px;
  605. }
  606. #content4 > .left > ul {
  607. width: 231px;
  608. height: 350px;
  609. background-image: radial-gradient(circle, RGB(84, 93, 125), RGB(74, 75, 93));
  610. border-radius: 0 0 0 10px;
  611. }
  612. #content4 > .left > ul a {
  613. color: #fff;
  614. }
  615. #content4 > .left > ul li {
  616. width: 211px;
  617. height: 32px;
  618. line-height: 32px;
  619. margin-top: 2px;
  620. }
  621. #content4 > .left > ul > li > a span:first-of-type {
  622. width: 10px;
  623. height: 10px;
  624. border-radius: 50%;
  625. border: 1px solid #fff;
  626. }
  627. #content4 > .left > ul > li > a span:nth-of-type(2):hover {
  628. color: RGB(187, 187, 187);
  629. }
  630. #content4 > .left > ul > li > a span:nth-of-type(2) {
  631. margin-left: 20px;
  632. }
  633. #content4 > .left > ul > li > a span:last-of-type {
  634. color: RGB(187, 187, 187);
  635. font-size: 12px;
  636. margin-left: 10px;
  637. }
  638. #content4 > .right {
  639. height: 390px;
  640. width: 966px;
  641. margin-top: 20px;
  642. }
  643. #content4 > .right > ul {
  644. width: 966px;
  645. height: 40px;
  646. background: RGB(238, 238, 238);
  647. border-radius: 0 10px 0 0;
  648. }
  649. #content4 > .right > ul > li {
  650. width: 68px;
  651. height: 40px;
  652. line-height: 40px;
  653. text-align: center;
  654. margin-left: 20px;
  655. color: RGB(102, 102, 102);
  656. }
  657. #content4 > .right > ul > li:first-of-type {
  658. background-image: radial-gradient(circle, RGB(93, 109, 154), RGB(74, 75, 93));
  659. color: #fff;
  660. }
  661. #content4 > .right > ul > li:hover {
  662. cursor: pointer;
  663. }
  664. #content4 > .right > div {
  665. width: 966px;
  666. height: 350px;
  667. background-image: radial-gradient(circle, RGB(93, 109, 154), RGB(74, 75, 93));
  668. border-radius: 0 0 10px 0;
  669. }
  670. #content4 > .right > div > div:first-of-type {
  671. width: 966px;
  672. height: 140px;
  673. }
  674. #content4 > .right > div > div:first-of-type a {
  675. display: block;
  676. width: 966px;
  677. height: 100px;
  678. line-height: 100px;
  679. text-align: center;
  680. }
  681. #content4 > .right > div > div:first-of-type a h1 {
  682. font-size: 30px;
  683. color: RGB(228, 224, 224);
  684. }
  685. #content4 > .right > div > div:first-of-type span {
  686. color: RGB(255, 255, 237);
  687. }
  688. #content4 > .right > div > div:nth-of-type(2) {
  689. width: 966px;
  690. height: 50px;
  691. }
  692. #content4 > .right > div > div:nth-of-type(2) span {
  693. width: 50px;
  694. height: 50px;
  695. font-size: 30px;
  696. background: #fff;
  697. color: RGB(183, 187, 191);
  698. line-height: 50px;
  699. }
  700. #content4 > .right > div > div:nth-of-type(2) input {
  701. width: 600px;
  702. height: 50px;
  703. border: none;
  704. outline: none;
  705. }
  706. #content4 > .right > div > div:nth-of-type(2) button {
  707. width: 80px;
  708. height: 50px;
  709. background: RGB(152, 161, 173);
  710. color: #fff;
  711. font-family: "宋体";
  712. font-size: 20px;
  713. z-index: 99;
  714. border: none;
  715. outline: none;
  716. }
  717. #content4 > .right > div > div:nth-of-type(2) button:hover {
  718. cursor: pointer;
  719. }
  720. #content4 > .right > div > div:nth-of-type(3) {
  721. margin-top: 20px;
  722. margin-left: 20px;
  723. }
  724. #content4 > .right > div > div:nth-of-type(3) span {
  725. color: #fff;
  726. }
  727. #content4 > .right > div > div:nth-of-type(3) a {
  728. display: block;
  729. height: 35px;
  730. background: RGB(137, 140, 135);
  731. line-height: 35px;
  732. text-align: center;
  733. margin-left: 20px;
  734. padding: 0 5px;
  735. color: #fff;
  736. }
  737. #content4 > .right > div > div:nth-of-type(4) {
  738. height: 35px;
  739. margin-top: 20px;
  740. }
  741. #content4 > .right > div > div:nth-of-type(4) span {
  742. color: #fff;
  743. margin-left: 20px;
  744. }
  745. .content5 {
  746. width: 1200px;
  747. height: 666px;
  748. }
  749. .content5 > div {
  750. width: 1200px;
  751. height: 646px;
  752. margin-top: 20px;
  753. background: #fff;
  754. border-radius: 10px;
  755. box-shadow: 0 0 5px #888888;
  756. }
  757. .content5 > div > .top {
  758. width: 1200px;
  759. height: 50px;
  760. text-align: center;
  761. line-height: 50px;
  762. }
  763. .content5 > div > .top > span {
  764. color: RGB(95, 159, 255);
  765. font-weight: bold;
  766. }
  767. .content5 > div > .top > h2 {
  768. font-size: 20px;
  769. font-family: "宋体";
  770. color: RGB(77, 85, 93);
  771. padding: 0 5px;
  772. }
  773. .content5 > div > .bottom {
  774. width: 1200px;
  775. height: 576px;
  776. }
  777. .content5 > div > .bottom > ul:first-of-type > li:first-of-type {
  778. width: 217px;
  779. height: 362px;
  780. margin-top: 10px;
  781. }
  782. .content5 > div > .bottom > ul:first-of-type > li:first-of-type img {
  783. width: 217px;
  784. height: 362px;
  785. border-radius: 5px;
  786. box-shadow: 0 0 5px #888888;
  787. }
  788. .content5 > div > .bottom > ul:first-of-type > li:last-of-type img {
  789. width: 217px;
  790. height: 124px;
  791. border-radius: 5px 5px 0 0;
  792. z-index: 10;
  793. }
  794. .content5 > div > .bottom > ul:first-of-type > li:last-of-type > a > div {
  795. width: 217px;
  796. height: 80px;
  797. z-index: 99;
  798. background: #fff;
  799. position: absolute;
  800. top: 92px;
  801. border-radius: 5px;
  802. }
  803. .content5 > div > .bottom > ul:first-of-type {
  804. width: 245px;
  805. height: 576px;
  806. }
  807. .content5 > div > .bottom > ul:first-of-type > li:not(:first-of-type) {
  808. width: 217px;
  809. height: 172px;
  810. margin-top: 20px;
  811. position: relative;
  812. border-radius: 5px;
  813. box-shadow: 0 0 5px #888888;
  814. }
  815. .content5
  816. > div
  817. > .bottom
  818. > ul:first-of-type
  819. > li:not(:first-of-type)
  820. > a
  821. > div:first-of-type
  822. > div {
  823. width: 217px;
  824. height: 40px;
  825. color: RGB(87, 96, 100);
  826. }
  827. .content5
  828. > div
  829. > .bottom
  830. > ul:first-of-type
  831. > li:not(:first-of-type)
  832. > a
  833. > div:first-of-type
  834. .span1 {
  835. background: RGB(147, 153, 159);
  836. padding: 1px;
  837. color: #fff;
  838. margin-right: 5px;
  839. }
  840. .content5
  841. > div
  842. > .bottom
  843. > ul:first-of-type
  844. > li:not(:first-of-type)
  845. > a
  846. > div:last-of-type {
  847. width: 217px;
  848. height: 40px;
  849. }
  850. .content5
  851. > div
  852. > .bottom
  853. > ul:first-of-type
  854. > li:not(:first-of-type)
  855. > a
  856. .span2 {
  857. color: RGB(147, 153, 159);
  858. font-size: 14px;
  859. line-height: 40px;
  860. margin-left: 25px;
  861. }
  862. .content5 > div > .bottom > ul:first-of-type > li a {
  863. color: RGB(87, 96, 100);
  864. }
  865. .content5 > div > .bottom > ul:last-of-type {
  866. width: 954px;
  867. height: 576px;
  868. }
  869. .content5 > div > .bottom > ul:last-of-type > li {
  870. width: 217px;
  871. height: 172px;
  872. position: relative;
  873. border-radius: 5px;
  874. box-shadow: 0 0 5px #888888;
  875. }
  876. .content5 > div > .bottom > ul:last-of-type > li > a > img {
  877. width: 217px;
  878. height: 124px;
  879. border-radius: 5px 5px 0 0;
  880. z-index: 10;
  881. }
  882. .content5 > div > .bottom > ul:last-of-type > li > a > div {
  883. width: 217px;
  884. height: 80px;
  885. z-index: 99;
  886. background: #fff;
  887. position: absolute;
  888. top: 92px;
  889. border-radius: 5px;
  890. }
  891. .content5 > div > .bottom > ul:last-of-type > li > a > div > div:first-of-type {
  892. width: 217px;
  893. height: 40px;
  894. color: RGB(87, 96, 100);
  895. }
  896. .content5 > div > .bottom > ul:last-of-type > li > a .span1 {
  897. background: RGB(147, 153, 159);
  898. padding: 1px;
  899. color: #fff;
  900. margin-right: 5px;
  901. }
  902. .content5 > div > .bottom > ul:last-of-type > li > a .span2 {
  903. color: RGB(147, 153, 159);
  904. font-size: 14px;
  905. line-height: 40px;
  906. margin-left: 25px;
  907. }
  908. /*底部******************************************/
  909. footer {
  910. width: 100%;
  911. height: 200px;
  912. background: RGB(57, 61, 73);
  913. }
  914. footer > .bottom {
  915. width: 1200px;
  916. height: 200px;
  917. }
  918. footer > .bottom > dd {
  919. width: 900px;
  920. height: 150px;
  921. margin-top: 30px;
  922. }
  923. footer > .bottom > dd li {
  924. width: 900px;
  925. height: 37px;
  926. position: relative;
  927. }
  928. footer > .bottom > dd li:first-of-type a {
  929. color: RGB(200, 205, 210);
  930. font-size: 13px;
  931. margin-left: 15px;
  932. line-height: 37px;
  933. }
  934. footer > .bottom > dd li span {
  935. font-size: 12px;
  936. line-height: 50px;
  937. position: relative;
  938. color: RGB(100, 125, 130);
  939. }
  940. footer > .bottom > dd li:first-of-type a:hover {
  941. color: #fff;
  942. }
  943. footer > .bottom > dd li:nth-of-type(2) img {
  944. width: 50px;
  945. height: 16px;
  946. position: absolute;
  947. bottom: 3px;
  948. left: 330px;
  949. }
  950. footer > .bottom > dd li:nth-of-type(2) span:last-of-type {
  951. margin-left: 70px;
  952. }
  953. footer > .bottom > dd li:nth-of-type(3) img {
  954. width: 15px;
  955. height: 18px;
  956. position: absolute;
  957. bottom: 0px;
  958. }
  959. footer > .bottom > dd li:nth-of-type(3) span:nth-of-type(2) {
  960. margin-left: 2px;
  961. }
  962. footer > .bottom > dd li:nth-of-type(3) span:nth-of-type(3) {
  963. margin-left: 20px;
  964. }
  965. footer > .bottom > dd li:nth-of-type(3) a {
  966. color: RGB(100, 125, 130);
  967. font-size: 13px;
  968. margin-left: 5px;
  969. }
  970. footer > .bottom > dd li:nth-of-type(3) a:hover {
  971. color: #fff;
  972. }
  973. footer > .bottom > div {
  974. width: 300px;
  975. height: 150px;
  976. margin-top: 30px;
  977. }
  978. footer > .bottom > div img {
  979. width: 100px;
  980. height: 100px;
  981. margin-top: 25px;
  982. }
  983. footer > .bottom > div img:nth-of-type(2) {
  984. margin-left: 10px;
  985. }
  • 公共css代码:
  1. * {
  2. padding: 0; /* 内边距 */
  3. margin: 0; /* 外边距 */
  4. box-sizing: border-box; /* 自己设定的宽度高度默认包括了内边距,边框的宽度 */
  5. font-size: 14px;
  6. }
  7. html,
  8. body {
  9. width: 100%; /* 宽百分百显示 */
  10. height: 100%; /* 高百分百显示 */
  11. overflow: hidden;
  12. overflow-y: auto;
  13. background: RGB(243, 245, 247);
  14. }
  15. a {
  16. text-decoration: none; /*去掉下划线*/
  17. }
  18. @font-face {
  19. /*引用阿里图标库*/
  20. font-family: "iconfont";
  21. src: url("../font_icon/iconfont.eot");
  22. src: url("../font_icon/iconfont.eot?#iefix") format("embedded-opentype"),
  23. url("../font_icon/iconfont.woff2") format("woff2"),
  24. url("../font_icon/iconfont.woff") format("woff"),
  25. url("../font_icon/iconfont.ttf") format("truetype"),
  26. url("../font_icon/iconfont.svg#iconfont") format("svg");
  27. }
  28. button,
  29. img {
  30. border: none; /*去掉默认边框样式*/
  31. outline: none;
  32. }
  33. .flexCompatible {
  34. /*flex兼容性设置*/
  35. display: -webkit-flex;
  36. display: -moz-flex;
  37. display: -o-flex;
  38. display: -ms-flexbox;
  39. display: flex;
  40. }
  41. li {
  42. list-style: none; /*去掉圆点*/
  43. }
  44. .flexGrow {
  45. flex-grow: 1; /*自动填充剩余空间*/
  46. }
  47. .flexShrinkFixed {
  48. flex-shrink: 0; /*防止缩小*/
  49. }
  50. .flexShrinkAuto {
  51. flex-shrink: 1;
  52. }
  53. .flexLevel {
  54. /*水平排列*/
  55. flex-direction: row;
  56. }
  57. .flexVertical {
  58. /*垂直排列*/
  59. flex-direction: column;
  60. }
  61. .flexWrap {
  62. flex-wrap: wrap;
  63. }
  64. .flexNoWrap {
  65. flex-wrap: nowrap;
  66. }
  67. .flexContentS {
  68. /*水平左对齐*/
  69. justify-content: start;
  70. }
  71. .flexContentC {
  72. /*水平居中对齐*/
  73. justify-content: center;
  74. }
  75. .flexContentE {
  76. /* 水平右对齐 */
  77. justify-content: flex-end;
  78. }
  79. .flexContentV {
  80. /* 水平平均对齐 */
  81. justify-content: space-evenly;
  82. }
  83. .flexContentA {
  84. /*项目位于各行之前、之间、之后都留有空白的容器内*/
  85. justify-content: space-around;
  86. }
  87. .flexContentB {
  88. /* 水平两端对齐 */
  89. justify-content: space-between;
  90. }
  91. .flexAlignS {
  92. /*垂直左对齐*/
  93. align-items: flex-start;
  94. }
  95. .flexAlignC {
  96. /*垂直居中对齐*/
  97. align-items: center;
  98. }
  99. .flexAlignE {
  100. /*垂直右对齐*/
  101. align-items: flex-end;
  102. }
  103. .flexAlignB {
  104. /*基线对齐*/
  105. align-items: baseline;
  106. }
  107. .flexAlignT {
  108. /* 自动伸展 */
  109. align-items: stretch;
  110. }
  111. .alignContentA {
  112. /*每根轴线两侧的间隔都相等。所以,轴线之间的间隔比轴线与边框的间隔大一倍*/
  113. align-content: space-around;
  114. }
  115. .alignContentB {
  116. /*与交叉轴两端对齐,轴线之间的间隔平均分布*/
  117. align-content: space-between;
  118. }
  119. .icon {
  120. width: 0.5em;
  121. height: 0.5em;
  122. vertical-align: -0.15em;
  123. fill: currentColor;
  124. overflow: hidden;
  125. }

总结

通过这次实战,我学到了很多,遇到问题就去百度或者区学习群里面问大家,收获到了很多,引用了周老师的的公共css文件和阿里图标库非常方便实用,但是代码多了我看起来也是晕晕的。

声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议