如何在 HTML 中使彈性 div 的寬度適應內容?


使用 display: inline-flex 使彈性 div 的寬度適應內容

#box {
   display: inline-flex;
   flex-direction: row;
   flex-wrap: wrap;
   max-width: 200px;
   padding: 10px;
   margin: 20px;
   background-color: blue;
}

更新時間:29-Jan-2020

263 次瀏覽

啟程開啟你的 職業

完成課程獲得認證

開始
廣告