当前位置:   article > 正文

前端学习(257):flex-direction_前端的flex-direction

前端的flex-direction

 

  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. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>Document</title>
  8. <style>
  9. .box{width: 300px;height: 300px;border: 1px solid black;margin: 20px auto;display: flex;flex-direction: row-reverse}
  10. .box div{width: 50px;height: 50px;color: white;line-height: 50px;text-align: center;background: red;}
  11. </style>
  12. </head>
  13. <body>
  14. <div class="box">
  15. <div>1</div>
  16. <div>2</div>
  17. <div>3</div>
  18. </div>
  19. </body>
  20. </html>

运行结果

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号