Hello all,I'm a junior on html,I have a question about css position :
first here is my demo html code
<div id="test-header">开发者_开发技巧</div>
<div id="test-content"></div>
<input type="button" value="body">
I set the "test-content" position: absolute,the "test-header" in default
but when I use $("body").height() to get the body's height,it only alert the "test-header"'s height ……
So why count would not include the abasolute element's height?
How can I solve this problem ?
here is my online case
This is the correct result, when you absolutely position an element it's taken out of the flow of the document, and doesn't occupy any space inside it's parent...which is why <body> doesn't account for the size it takes up.
加载中,请稍侯......
精彩评论