Blogger Information
Blog 3
fans 0
comment 0
visits 2565
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
WEB前端教学-flex 6个属性练习
Amiable崔洪刚
Original
456 people have browsed it

flex 弹性容器六个属性练习(代码写错了,重新提交)

先上传下代码:

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>flex属性应用</title>
  6. <style>
  7. .container {
  8. width: 600px;
  9. height: 300px;
  10. border: 1px dashed;
  11. /*只要盒子加了padding,border 就马上加上box-sizing*/
  12. box-sizing: border-box;
  13. background-color: lightskyblue;
  14. }
  15. .item {
  16. width: 200px;
  17. height: 50px;
  18. border: 1px dashed;
  19. background-color: wheat;
  20. }
  21. .container {
  22. display: flex;
  23. }
  24. .container {
  25. /*设置不同的属性会产生不同的排列效果*/
  26. /*flex-direction: row;*/
  27. /*flex-direction: column;*/
  28. flex-wrap: wrap;
  29. /*flex-flow: row wrap;*/
  30. /*justify-content: center;*/
  31. /*align-items: center;*/
  32. /*align-content: space-evenly;*/
  33. }
  34. </style>
  35. </head>
  36. <body>
  37. <div class="container">
  38. <span class="item">1</span>
  39. <span class="item">2</span>
  40. <span class="item">3</span>
  41. <span class="item">4</span>
  42. <span class="item">5</span>
  43. <span class="item">6</span>
  44. <span class="item">7</span>
  45. </div>
  46. </body>
  47. </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