I find that when I position an element fixed, it doesn't matter if the parent is positioned relative or not, it will position fixed, relative to the window?
CSS
#wrapper { width: 300px; background: orange; margin: 0 auto; position: relative; }
#feedback { position: fixed; right: 0; top: 120px; }
HTML
<div id="wrapper">
...
<a id="feedback" href="#">Feedback</a>
</div>
通过多个div,我设法获得了固定y和绝对x的div。在我的情况下,我需要在左右两侧设置一个div,并与一个居中的1180px宽度div对齐。