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

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.

主站蜘蛛池模板: 深泽县| 南江县| 平顺县| 孟津县| 县级市| 辽源市| 西林县| 荣昌县| 滁州市| 绥宁县| 松潘县| 林口县| 台东县| 利川市| 崇文区| 海丰县| 漯河市| 泸溪县| 托克逊县| 陇南市| 砀山县| 西乌| 伊宁市| 奉化市| 新平| 额尔古纳市| 随州市| 文昌市| 兰州市| 阳城县| 营口市| 云梦县| 台安县| 门头沟区| 易门县| 枣强县| 安顺市| 布拖县| 东至县| 越西县| 满洲里市|