Strange behavior of “overflow: auto” on Chrome

荒凉一梦 提交于 2019-12-01 03:28:56

I found the solution to my problem. For some reason, for this to work in Chrome I had to add a position:relative rule to #content:

#content{
    position: relative;
    height: 200px;
    overflow:visible;
    border 1px solid red;
}

A possible answer from HTML5 Application Development Fundamentals

#content{
     height: 200px;
     region-overflow:auto;
     overflow:visible;
     border 1px solid red;
}

Now this is gearing more towards responsive design. Add -webkit- before overflow might help since it is a chrome issue only. Assuming it is CSS3.

#content {
    height: 200px;
    overflow: auto;
    -webkit-overflow: auto;
    border: 1px solid red;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!