以下之间的本质区别是什么:
position: absolute; top: 0; height: 100%;
和@H_502_5@
position: absolute; top: 0; bottom: 0;
解决方法
子元素的高度对于每个属性的确定方式不同:
底部:0 =>
child_height = parent_height – child_margin – child_border@H_502_5@
身高:100%=>
child_height = parent_height@H_502_5@
换句话说,height:100%将子项的内部高度设置为其父项的相同高度,而bottom:0将子项的外部高度设置为其父项的相同高度.@H_502_5@
例如:http://jsfiddle.net/2N4QJ/1/@H_502_5@
有关位置/尺寸的更多信息:
http://msdn.microsoft.com/en-us/library/ms530302(VS.85).aspx@H_502_5@