Blogger Information
Blog 29
fans 0
comment 0
visits 19629
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
你好平凡的我
牡丹飞
Original
511 people have browsed it

1效果



2代码


  1. <!DOCTYPE html>
  2. <html lang="">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>你好平凡的我</title>
  7. </head>
  8. <style>
  9. :root {
  10. font-size: 1.25em;
  11. box-sizing: border-box;
  12. text-align: center;
  13. }
  14. * {
  15. margin: 0;
  16. padding: 0;
  17. box-sizing: inherit;
  18. }
  19. .container {
  20. margin-top: 1em;
  21. background-color: rgb(233, 220, 220);
  22. }
  23. .box {
  24. border: lightcyan 1px solid;
  25. border-radius: 1em;
  26. background-color: rgb(20, 222, 236);
  27. }
  28. body {
  29. width: 100%;
  30. }
  31. .box-left {
  32. display: inline-block;
  33. width: 70%;
  34. }
  35. .box-right {
  36. display: inline-block;
  37. width: 28%;
  38. margin-left: 1%; /* 100%会换行不知道原因 老师代码运行也是这样 */
  39. }
  40. table {
  41. width: 100%;
  42. border-spacing: 2em 0.1em;
  43. margin-left: -2em;
  44. margin-right: -4em;
  45. }
  46. .wrapper {
  47. margin-right: -4em;
  48. }
  49. </style>
  50. <body>
  51. <div class="container">
  52. <div class="box"><h1>你好平凡的我</h1></div>
  53. <div class="box box-left"><p>忘记之前的成就</p></div>
  54. <div class="box box-right"><p>活出现在的样子</p></div>
  55. <div class="wrapper">
  56. <table>
  57. <tr class="tr">
  58. <td class="box box-td-left">
  59. <p>过去的我</p>
  60. <p>一直百度</p>
  61. <p>解决问题</p>
  62. </td>
  63. <td class="box box-td">
  64. <p>现在的我</p>
  65. <p>认真听课</p>
  66. <p>完成作业</p>
  67. </td>
  68. <td class="box box-td-right">
  69. <p>未来的我</p>
  70. <p>开心工作</p>
  71. <p>热情生活</p>
  72. <p>享受生活</p>
  73. </td>
  74. </tr>
  75. </table>
  76. </div>
  77. </div>
  78. </body>
  79. </html>

3总结


谢谢老师!
代码在我电脑100%是不行的 老师代码也不行;
学到了间隙、等高、通用设置、box-sizing:border-box。IE盒子使用等。


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