官术网_书友最值得收藏!

Mixing flex and non-flex items

We can also have flex and non-flex items together in the same flex parent. Non-flex items must declare their width and height attributes explicitly, and the remaining space will be divided between the flex items:

<div class="flex-container-row">
<amp-img src="img/placeholder.png" width="250" height="150" layout="fixed"></amp-img>
<amp-img src="img/placeholder.png" height="100" layout="flex-item">
</amp-img>
<amp-img src="img/placeholder.png" layout="flex-item"></amp-img>
<amp-img src="img/placeholder.png" layout="flex-item"&gt;</amp-img>
</div>
Mixed flex and non flex items filling a flex container
Note that we are demonstrating these layouts with uniform, square images so that their distortion will show how different layouts will affect components. It is unlikely that you will ever want actual images to distort like this, but it will be useful to know what to expect when applying these layouts to other components, such as amp-fit-text and amp-carousel, that we'll see later.

That's probably enough about flex layouts for now. We'll see how to use this last flex layout later in the chapter.

主站蜘蛛池模板: 辰溪县| 普陀区| 晋江市| 石家庄市| 凤翔县| 贵港市| 彩票| 五峰| 加查县| 襄城县| 师宗县| 新余市| 柞水县| 特克斯县| 灵石县| 花垣县| 上栗县| 竹溪县| 页游| 周口市| 三亚市| 峡江县| 淅川县| 临猗县| 屏南县| 合江县| 双柏县| 栖霞市| 应用必备| 都江堰市| 格尔木市| 康定县| 镶黄旗| 绥滨县| 定陶县| 满城县| 镇原县| 环江| 武城县| 临沂市| 调兵山市|