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

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.

主站蜘蛛池模板: 葫芦岛市| 容城县| 普宁市| 平昌县| 凤山县| 浦城县| 永吉县| 乌恰县| 田东县| 嘉善县| 乡城县| 崇阳县| 会同县| 丹东市| 万山特区| 镇平县| 建德市| 安国市| 汶川县| 和硕县| 沁水县| 连云港市| 岑溪市| 商南县| 东乌珠穆沁旗| 岳普湖县| 屏南县| 留坝县| 鲁甸县| 屏东市| 苏尼特左旗| 长垣县| 凤凰县| 林州市| 明溪县| 株洲县| 安义县| 廊坊市| 阿图什市| 桑日县| 景谷|