css height: 100% and height: the difference between the auto

css height: 100% and height: the difference between the auto

height: auto, automatic height adjustment means according to the content of the blocks.
height: 100%, the height refers to the height relative to the parent block defined, i.e. according to the height from its parent layer and has recently defined a height of defined height.
The default value is the auto height

ps width is the same reason

Guess you like

Origin www.cnblogs.com/newmiracle/p/11865486.html