
上QQ阅读APP看书,第一时间看更新
The AMP-HTML layout system
AMP's layout system is key to reducing rendering and scrolling-jank. AMP uses a static layout system that relies on a set of attributes to define the layout and sizing of elements. These are layout, width, height, sizes, and heights. With these attributes, AMP is able to efficiently calculate the layout and size of each element even before anything is fetched from the network.
AMP's layout system is built on web technologies, and to use it effectively, you'll need to have an understanding of CSS and HTML, and to be able to use them constructively to support your desired AMP layouts. We'll see this later in this chapter.