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

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.

主站蜘蛛池模板: 金溪县| 通许县| 朝阳县| 尖扎县| 丰城市| 佛冈县| 兴仁县| 台东县| 呼和浩特市| 梧州市| 周至县| 华宁县| 南开区| 宁强县| 永靖县| 阳高县| 怀仁县| 通辽市| 潞城市| 江川县| 竹溪县| 铜山县| 安康市| 阿城市| 西青区| 乃东县| 高安市| 曲水县| 泽普县| 六枝特区| 滕州市| 泾源县| 富顺县| 游戏| 漯河市| 子长县| 灯塔市| 柳州市| 疏附县| 河津市| 乌兰察布市|