Three layout pages (fixed layout, flow layout, layout elasticity)

Fixed layout:

Px width to be set!

 

Fluid layout:

A percentage to set the widths! When a small width, the line width becomes very narrow and difficult to read. So we have to give it added in px or em units of min-width, so as to prevent the layout becoming too narrow!

 

Elastic layout:

Size set with respect to the width, is provided as a unit width em! As the font size increases the width of the entire layout will increase, and therefore may be wider than the browser window, resulting in a horizontal scroll bar appears. So, give it to add a max-width is 100%!

 

Note: em is always relative to the size of the parent element; rem is always relative to the size of html

Guess you like

Origin www.cnblogs.com/Salicejy/p/11239366.html