- AMP:Building Accelerated Mobile Pages
- Ruadhan O'Donoghue
- 134字
- 2021-07-08 10:04:01
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.
推薦閱讀
- Python科學計算(第2版)
- Delphi程序設計基礎:教程、實驗、習題
- Mastering C# Concurrency
- Functional Programming in JavaScript
- Koa開發:入門、進階與實戰
- Java:Data Science Made Easy
- 鋒利的SQL(第2版)
- Apache Mesos Essentials
- KnockoutJS Starter
- Python Web數據分析可視化:基于Django框架的開發實戰
- R語言與網絡輿情處理
- 批調度與網絡問題的組合算法
- Android驅動開發權威指南
- C專家編程
- Laravel Application Development Blueprints