问题
jsfiddle
The above snippet renders the way I intend it in Chrome (v.20). However in Firefox 11 and IE 9 the 2nd and 3rd content divs do not appear to take into account top and left CSS values.
What is the correct method of relative positioning with percentage widths?
回答1:
I your case container doesn't have height. You can use this:
body, html {
min-height: 100%;
height: 100%;
}
来源:https://stackoverflow.com/questions/11777293/relative-positioning-with-percentage-values-in-top-property