日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

弹性盒子 flex-direction

發(fā)布時間:2025/7/14 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 弹性盒子 flex-direction 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

  使用彈性盒子可以更方便的對頁面內容進行布局

  flex-direction指定了子元素在父元素盒子中的排列方式

  1.flex-direction:row

    flex默認排列方式,從左到右排列,左對齊

  2.flex-direction:row-reverse

    與row反向,從右向左排列,右對齊,第一個在最右邊

  3.flex-direction:column

    從上到下依次排列,向上對齊

  4.flex-direction:column-reverse

    與column相反,從下到上對齊,第一個在最下面

?

  說明:HTML

<!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8"><title>flex</title><link rel="stylesheet" href="flex.css"> </head> <body><div id="content"><div>div1</div><div>div2</div><div>div3</div></div> </body> </html>

    row:

#content {width: 500px;height: 500px;background: #0395e1;display: flex;flex-direction: row; } #content>div {width: 100px;height: 100px;margin: 10px;background: #e53935; }

    樣式:

    

    row-reverse:

    

#content {width: 500px;height: 500px;background: #0395e1;display: flex;flex-direction: row-reverse; } #content>div {width: 100px;height: 100px;margin: 10px;background: #e53935; }

    樣式:

    

    column:

    

#content {width: 500px;height: 500px;background: #0395e1;display: flex;flex-direction:column; } #content>div {width: 100px;height: 100px;margin: 10px;background: #e53935; }

    樣式:

    

    column-reverse:

    

#content {width: 500px;height: 500px;background: #0395e1;display: flex;flex-direction:column-reverse; } #content>div {width: 100px;height: 100px;margin: 10px;background: #e53935; }

    樣式:

    

轉載于:https://www.cnblogs.com/zhangcheng001/p/10948985.html

總結

以上是生活随笔為你收集整理的弹性盒子 flex-direction的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。