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

Layout in AMP

The reason we must provide width, height, and layout attributes for images is to do with how AMP calculates the layout of the page. AMP uses a static layout system so that it can render pages more quickly. If the AMP runtime has this information upfront, in the markup, then it can always know how much space any element will take up. This means it can calculate the layout of the page efficiently even before external resources are loaded, and without having to reflow the page as they are loaded. We'll look at the AMP layout attribute in more detail in the next chapter.

We've just had our first encounter with HTML tag restrictions in AMP. Now's a good time to take a look at what tags are or aren't permitted.

主站蜘蛛池模板: 蒲江县| 和静县| 吴忠市| 通许县| 阿拉善盟| 广河县| 滦南县| 建德市| 都安| 泽普县| 安义县| 固安县| 台州市| 湘潭县| 洛南县| 淮北市| 忻州市| 德昌县| 故城县| 周口市| 喜德县| 古交市| 恩平市| 望都县| 桂阳县| 巴彦淖尔市| 榆中县| 阿拉善右旗| 砚山县| 怀柔区| 平远县| 朝阳区| 星座| 武定县| 墨玉县| 安新县| 寿阳县| 江阴市| 贵港市| 汕头市| 沅江市|