- AMP:Building Accelerated Mobile Pages
- Ruadhan O'Donoghue
- 54字
- 2021-07-08 10:04:08
Flex items with specific proportions
We can also specify specific proportions for each of the items in our flex layout. The following code shows how you could split the available space 25-50-25 between three flex items:
.flex-50 {
flex-basis: 50%;
}
.flex-25 {
flex-basis: 25%;
}
...
<div class="flex-container-row">
<amp-img class="flex-25" src="img/placeholder.png" layout="flex-item">
</amp-img>
<amp-img class="flex-50" src="img/placeholder.png" layout="flex-item">
</amp-img>
<amp-img class="flex-25" src="img/placeholder.png" layout="flex-item">
</amp-img>
</div>

Flex items filling a flex container proportionally
推薦閱讀
- HTML5+CSS3王者歸來
- 程序員面試筆試寶典(第3版)
- JavaScript 從入門到項目實踐(超值版)
- MATLAB定量決策五大類問題
- Oracle從入門到精通(第5版)
- Learning DHTMLX Suite UI
- BIM概論及Revit精講
- Getting Started with Python and Raspberry Pi
- Natural Language Processing with Python Quick Start Guide
- Data Science Algorithms in a Week
- JavaScript編程精解(原書第2版)
- 機器人ROS開發實踐
- The Python Apprentice
- Learning WebRTC
- 網頁設計理論與實踐