- 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.
推薦閱讀
- Advanced Quantitative Finance with C++
- 深入淺出WPF
- R語言編程指南
- SAS數據統計分析與編程實踐
- C程序設計實踐教程
- Nginx Lua開發實戰
- Service Mesh實戰:基于Linkerd和Kubernetes的微服務實踐
- 區塊鏈技術進階與實戰(第2版)
- 現代C++編程實戰:132個核心技巧示例(原書第2版)
- Java Web開發實例大全(基礎卷) (軟件工程師開發大系)
- Fastdata Processing with Spark
- Learning Nessus for Penetration Testing
- C#面向對象程序設計(第2版)
- Oracle Database XE 11gR2 Jump Start Guide
- Ionic3與CodePush初探:支持跨平臺與熱更新的App開發技術