gpt4 book ai didi

css - 苹果浏览器 OSX : overflow-y: scroll is forcing element to hide overflowing elements horizontally

转载 作者:太空宇宙 更新时间:2023-11-04 03:39:52 24 4
gpt4 key购买 nike

我的问题如下:

我有一个 div,它有一组按钮,每个按钮都有一个与其关联的弹出窗口。

<div id="floatingFilter">
<div class="div-1">
<button class="popupActivator">Trigger Popup</button>
<div class="popupContainer"><span>This is my popup.</span></div>
</div>
</div>

CSS:

#floatingFilter {
height: 100%;
width: 200px;
overflow-y: scroll;
position: fixed;
top: 0px;
right: 0px;
}
.popupContainer {
position: fixed;
right: 190px;
top: 100px;
width: 100px;
height: 100px;
}

当我在 Safari OSX 上打开弹出窗口时,我只能看到 popupContainer 的前 10px。其余部分是隐藏的。

有人遇到过这个问题/有解决方案吗?它适用于其余浏览器。

参见 plunker

最佳答案

这是因为你设置了position:fixed。这将不允许它滚动。如果您删除此规则,则它可以正常工作。

演示 http://jsfiddle.net/wtTLf/

关于css - 苹果浏览器 OSX : overflow-y: scroll is forcing element to hide overflowing elements horizontally,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25064754/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com