auto和100%的区别

auto是随内容的高度而撑开的。100%是根据父级元素的高度来决定的。
例如:
<div style="height:100px;200px;">  

<div style="height:auto;100px;float:left;">这个容器的高度是随里面的内容的高度而定</div>
<div style="height:100%;100px;float:right;">这个容器的高度为父级的高度,100px</div> </div>
并且:auto总是占据整行。
原文地址:https://www.cnblogs.com/sky8-/p/4041747.html