使用flex布局把三个元素分配成两列,第二列垂直布局两个元素
生活随笔
收集整理的這篇文章主要介紹了
使用flex布局把三个元素分配成两列,第二列垂直布局两个元素
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
https://stackoverflow.com/questions/43056180/flexbox-3-divs-two-columns-one-with-two-rows/43057107
最后要實現(xiàn)的效果:
解決方案:
.flex-row {flex-direction: row;display: flex; }.flex-column {flex-direction: column;display: flex; }.flex-body {display: flex; }.flex-body div:not([class*="flex"]) {border: 1px solid white;flex: 1 1 200px;width: 300px; } <div class="flex-body"><div class="flex-row"><div style="background: #0980cc;"></div></div><div class="flex-column"><div style="background: #09cc69;"></div><div style="background: #cc092f;"></div></div> </div>總結
以上是生活随笔為你收集整理的使用flex布局把三个元素分配成两列,第二列垂直布局两个元素的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 当归可以泡脚吗有什么作用
- 下一篇: Flex布局里的align-self属性