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

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.

主站蜘蛛池模板: 遂宁市| 彰化市| 兰溪市| 台中县| 平江县| 吕梁市| 洛川县| 团风县| 延川县| 栖霞市| 英吉沙县| 宁德市| 陇西县| 侯马市| 平顶山市| 香港 | 鹤峰县| 平潭县| 万盛区| 台东市| 邮箱| 大连市| 绍兴市| 潜山县| 思南县| 旺苍县| 宁津县| 黔南| 盐池县| 富民县| 资阳市| 蕲春县| 葫芦岛市| 浮梁县| 玛纳斯县| 会泽县| 武胜县| 铜鼓县| 平定县| 深圳市| 突泉县|