- 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 3.7網絡爬蟲快速入門
- Mastering Concurrency in Go
- Java Web開發之道
- Production Ready OpenStack:Recipes for Successful Environments
- C語言最佳實踐
- Python程序設計案例教程
- Python高效開發實戰:Django、Tornado、Flask、Twisted(第3版)
- Python機器學習基礎教程
- 網站構建技術
- Android開發案例教程與項目實戰(在線實驗+在線自測)
- Extending Puppet(Second Edition)
- Java EE企業級應用開發教程(Spring+Spring MVC+MyBatis)
- Arduino計算機視覺編程
- QlikView Unlocked
- PHP+MySQL動態網站開發從入門到精通(視頻教學版)