当前位置:   article > 正文

flex布局实现等分_flex 二等分

flex 二等分
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title></title>
  6. <style type="text/css">
  7. .color_container {
  8. width: 100%;
  9. height: 22px;
  10. display: flex;
  11. flex-direction: row
  12. }
  13. .color_container>div{
  14. height: 22px;
  15. flex: 1;
  16. margin-left: 10px;
  17. }
  18. </style>
  19. </head>
  20. <body>
  21. <div class="color_container">
  22. <div title="紫色" style="background-color: rgb(121, 56, 106);"></div>
  23. <div title="蓝色" style="background-color: rgb(57, 107, 179);"></div>
  24. <div title="绿色" style="background-color: rgb(152, 203, 104);"></div>
  25. <div title="黄色" style="background-color: rgb(251, 220, 4);"></div>
  26. <div title="橙色" style="background-color: rgb(243, 121, 32);"></div>
  27. <div title="红色" style="background-color: rgb(202, 33, 40);"></div>
  28. </div>
  29. </body>
  30. </html>

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/241976
推荐阅读
相关标签
  

闽ICP备14008679号