我的页面上有一个固定的 div,它使用以下 CSS 属性定位:
width: 320px;
height: 160px;
position: fixed;
right: 15px;
bottom: 15px;
top: unset;
z-index: -1;
div 在其他浏览器中显示在页面的右下角,但在 Internet Explorer 11 中显示在右上角。我相信这个问题来自 top: unset;
IE 似乎不支持它。
是否有任何使用 CSS 或 JS 的解决方法可用于实现相同的定位?
原文由 Mike 发布,翻译遵循 CC BY-SA 4.0 许可协议
您似乎正在寻找
top: auto
。