- AMP:Building Accelerated Mobile Pages
- Ruadhan O'Donoghue
- 61字
- 2021-07-08 10:04:08
Full width flex item container
If you want the parent container to stretch to the full width of the page, you can omit a width and height value for the parent, but you will need to provide a height for the flex-item children:
.flex-container-row {
display: flex;
flex-direction: row;
}
...
<div class="flex-container-row">
<amp-img src="img/placeholder.png" layout="flex-item" height="200">
</amp-img>
<amp-img src="img/placeholder.png" layout="flex-item" height="100">
</amp-img>
</div>

Full width flex parent with fixed height flex item children
推薦閱讀
- Monkey Game Development:Beginner's Guide
- Objective-C應用開發全程實錄
- 劍指Offer(專項突破版):數據結構與算法名企面試題精講
- Vue.js快跑:構建觸手可及的高性能Web應用
- 實戰低代碼
- JavaScript by Example
- MongoDB權威指南(第3版)
- ASP.NET程序開發范例寶典
- Mastering Embedded Linux Programming
- Scrapy網絡爬蟲實戰
- Java程序設計實用教程(第2版)
- Android初級應用開發
- Python繪圖指南:分形與數據可視化(全彩)
- Zend Framework 2 Cookbook
- 基于JavaScript的WebGIS開發