css - 当子元素在父元素上方时,safari 不滚动

标签 css firefox safari

我有标签部分。单击选项卡时,其子内容出现在带有 CSS 的部分

position: absolute;
z-index: 9999;
top: 0;
left: 0;
height: 250px;
overflow: scroll;

但子元素似乎不可滚动。

最佳答案

请提及 Overflow-x 或 y 轴,不要使用 overflow:scroll;使用溢出:隐藏;

.abc {
height:100px;
overflow-x:hidden;}
<div class="abc">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</div>

关于css - 当子元素在父元素上方时,safari 不滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59731418/

相关文章:

html - CSS 无效属性值( Bootstrap )- 字体悬停颜色

html - Firefox 8 仍然不支持多行标题或替代文本 ("tooltips")?

firefox - Firefox插件SDK-如何从youtube.com上的youtube播放器中检索 “currentTime”?

css - Safari 更改选择高度

css - 使用 Chris Coyier 全 Angular hack 没有高度

javascript - 禁用 CSS 链接的时机

html - Webkit 与 Firefox 背景位置和背景附件

iOS 8 "Copy/Paste"对话消失

javascript - 移动设备的地理定位

html - 如何在网站中获取填充整个页面的渐变背景