order
order 属性 设置或检索弹性盒模型对象的子元素出现的順序。。
注意:如果元素不是弹性盒对象的元素,则 order 属性不起作用。
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Flexbox Demo</title> <style> .container1 { height: 500px; display: flex; border: 2px solid #ccc; justify-content: center; align-items: center; flex-wrap: wrap; } .item { width: 200px; height: 200px; } </style> </head> <body> <div class="container1"> <div class="item" style="background-color: red;order: 1"></div> <div class="item" style="background-color: yellow;order: 1"></div> <div class="item" style="background-color: blue;order: -1"></div> </div> </body> </html>
详解查看官方解释
—-想了解更多的css相关样式处理怎么解决关注<计算机技术网(www.ctvol.com)!!>
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/csstutorial/107734.html