【问题标题】:safari not scrolling when the child element is over the parent当子元素在父元素之上时,safari 不滚动
【发布时间】:2020-05-01 00:57:20
【问题描述】:

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

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

但似乎子元素不可滚动。

【问题讨论】:

    标签: css firefox safari


    【解决方案1】:

    请提及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>

    【讨论】:

    • 是的,但就我而言,还有另一种解决方案,因为它没有帮助
    • @TakhtakTeam 请在 codepen 编辑器上分享您的代码
    • 谢谢。我试图创建一个 sn-p 但我的代码在 codepen 上工作
    猜你喜欢
    • 1970-01-01
    • 2021-08-15
    • 2017-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-12-22
    相关资源
    最近更新 更多