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

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.

主站蜘蛛池模板: 任丘市| 门头沟区| 忻城县| 沿河| 辽阳市| 舒兰市| 峨边| 若尔盖县| 来宾市| 涪陵区| 昌宁县| 庆云县| 万年县| 沾化县| 扎兰屯市| 蓝田县| 丁青县| 肥西县| 海晏县| 日照市| 军事| 兰坪| 宜阳县| 高陵县| 襄汾县| 乐至县| 锡林郭勒盟| 镇康县| 长治县| 台前县| 浏阳市| 西和县| 庆云县| 嘉善县| 炎陵县| 樟树市| 安西县| 中阳县| 博湖县| 湟源县| 柳江县|