
上QQ阅读APP看书,第一时间看更新
The layout attribute
The layout attribute in AMP gives the developer a very powerful, per-element tool for declaring how elements should be displayed on the page. It offers a convenient way to implement common layout patterns that would otherwise require complex CSS to build. This makes the layout attribute extremely useful, especially considering AMP's 50 KB CSS limitation.
The layout attribute can be applied to any AMP element (but not regular HTML elements), and can take the following values:

If no value is supplied for the layout attribute of a component, its layout will be inferred as follows:
