- 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
推薦閱讀
- 基于粒計算模型的圖像處理
- Angular UI Development with PrimeNG
- 垃圾回收的算法與實現
- Mastering Concurrency in Go
- Vue.js入門與商城開發實戰
- 跟小海龜學Python
- Mastering Ubuntu Server
- Data Analysis with IBM SPSS Statistics
- JavaScript 程序設計案例教程
- Getting Started with Hazelcast(Second Edition)
- Create React App 2 Quick Start Guide
- SSM開發實戰教程(Spring+Spring MVC+MyBatis)
- Java Fundamentals
- Kubernetes進階實戰
- Laravel Application Development Blueprints