解决方法
您可能希望将绝对对齐的div放在相对对齐的容器中 – 这样它仍将包含在容器中而不是浏览器窗口中.
- <div style="position: relative;background-color: blue; width: 600px; height: 800px;">
- <div style="position: absolute; bottom: 5px; background-color: green">
- TEST (C) 2010
- </div>
- </div>