- 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.
推薦閱讀
- Vue 3移動(dòng)Web開發(fā)與性能調(diào)優(yōu)實(shí)戰(zhàn)
- HTML5 Mobile Development Cookbook
- Eclipse Plug-in Development:Beginner's Guide(Second Edition)
- 程序是怎樣跑起來的(第3版)
- Learning Probabilistic Graphical Models in R
- Mobile Device Exploitation Cookbook
- C語言程序設(shè)計(jì)簡明教程:Qt實(shí)戰(zhàn)
- 持續(xù)集成與持續(xù)交付實(shí)戰(zhàn):用Jenkins、Travis CI和CircleCI構(gòu)建和發(fā)布大規(guī)模高質(zhì)量軟件
- HTML5+CSS3+JavaScript 從入門到項(xiàng)目實(shí)踐(超值版)
- SwiftUI極簡開發(fā)
- scikit-learn Cookbook(Second Edition)
- 微前端設(shè)計(jì)與實(shí)現(xiàn)
- 程序員的成長課
- 計(jì)算機(jī)程序的構(gòu)造和解釋(JavaScript版)
- Mastering Machine Learning with scikit-learn