无法使使用 CSS“top and left and position:fixed attributes”定位的元素居中。
最佳答案
Position fixed 将元素放置在浏览器的引用位置,而不是父元素。请参阅有关 position:fixed -
的摘录Generates an absolutely positioned element, positioned relative to the browser window. The element's position is specified with the "left", "top", "right", and "bottom" properties
来自 here
您可能想使用 position: relative
,但没有源代码就很难确定。
关于asp.net - 使用 CSS 固定定位定位中心元素,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4820628/