Blogger Information
Blog 12
fans 0
comment 0
visits 8515
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
仿写phpcn UI手册
brait
Original
825 people have browsed it

用flex仿写phpcnUI手册首页

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>phpcnui_</title>
  6. <link rel="stylesheet" href="static/style.css">
  7. </head>
  8. <body>
  9. <header class="header">
  10. <h1 class="phpcn-color-deepgray phpcn-ml-40" ><span class="phpcn-color-coral" style="text-shadow: 2px 2px 1px #333; font-weight: bolder">phpcn UI</span> 用户参考手册</h1>
  11. </header>
  12. <main class="main">
  13. <article class="center">
  14. <iframe src="welcome.html" frameborder="0" name="content" width="100%" height="900"></iframe>
  15. </article>
  16. <div class="left">
  17. <ul class="left1" id="nav" style="min-height: 800px;">
  18. <li style="cursor: pointer;"><strong>前端基础</strong>
  19. <ul class="" >
  20. <li><a href="base/1_框架安装.html" target="content">框架安装</a></li>
  21. <li><a href="base/2_页面结构.html" target="content">页面结构</a></li>
  22. <li><a href="base/3_常用标签.html" target="content">常用标签</a></li>
  23. <li><a href="base/4_CSS选择器.html" target="content">CSS选择器</a></li>
  24. <li><a href="base/5_CSS样式控制.html" target="content">CSS样式控制</a></li>
  25. <li><a href="base/6_CSS盒模型.html" target="content">CSS盒模型</a></li>
  26. <li><a href="base/7_CSS浮动与定位.html" target="content">CSS浮动与定位</a></li>
  27. <li><a href="base/8_CSS常用布局方式.html" target="content">CSS常用布局方式</a></li>
  28. </ul>
  29. </li>
  30. <li style="cursor: pointer;"><strong>框架组件</strong>
  31. <ul class="">
  32. <li><a href="component/1_栅格布局.html" target="content">栅格布局</a></li>
  33. <li><a href="component/2_常用样式.html" target="content">常用样式</a></li>
  34. <li><a href="component/3_文本与背景色.html" target="content">文本与背景色</a></li>
  35. <li><a href="component/4_表格.html" target="content">表格</a></li>
  36. <li><a href="component/5_分页条.html" target="content">分页条</a></li>
  37. </ul>
  38. </li>
  39. </ul>
  40. </div>
  41. </main>
  42. <footer class="footer"><p class="phpcn-mb-10 phpcn-tx-c"><a href="https://www.php.cn/">php中文网</a>©版权所有(2019)</p</footer>
  43. </body>
  44. </html>

CSS部分:

  1. *{
  2. margin: 0;
  3. padding: 0;
  4. }
  5. body{
  6. display: flex;
  7. height: 100vh;
  8. flex-flow: column nowrap;
  9. }
  10. li {
  11. list-style: none;
  12. }
  13. a{
  14. text-decoration: none;
  15. color: black;
  16. }
  17. .main{
  18. box-sizing: border-box;
  19. flex: 1;
  20. display: flex;
  21. }
  22. .left{
  23. box-sizing: border-box;
  24. width: 200px;
  25. background-color: #eeeeee;
  26. padding: 30px;
  27. }
  28. .center{
  29. box-sizing: border-box;
  30. flex: 1;
  31. }
  32. .header,
  33. .footer{
  34. box-sizing: border-box;
  35. display: flex;
  36. background-color: #d4d4d4;
  37. height: 50px ;
  38. }
  39. .left{
  40. order: -1;
  41. }
  42. h1{
  43. color: #555555;
  44. font-size: 28px;
  45. font-weight: normal;
  46. margin-left:30px;
  47. }
  48. h1>span{
  49. color: red;
  50. }
  51. .left1 > li>strong {
  52. font-size: 18px;
  53. }
  54. .center{
  55. display: flex;
  56. justify-content: center;
  57. align-content: center;
  58. }
  59. .left1 >li >ul> li{
  60. font-size: 5px;
  61. padding-top: 10px;
  62. margin-left: 10px;
  63. }
  64. .left1 >li >ul> li:last-of-type{
  65. padding-bottom: 30px;
  66. }
  67. .footer{
  68. align-content: center;
  69. justify-content: center;
  70. }

运行效果


学习总结

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