【发布时间】:2017-07-11 02:44:10
【问题描述】:
当我将overflow: scroll 设置为 div 时,我希望即使内容不滚动(出于设计目的)也会有一个滚动条
但是当不需要滚动时,chrome mobile 还是会隐藏滚动条。
.div-scroll{
background-color: red;
height: 300px;
overflow-y: scroll;
}
.div-inner {
background-color: blue;
height: 200px;
}
<div class="div-scroll">
<div class="div-inner">
</div>
</div>
我想在内容不滚动时在 Chrome Mobile 上显示禁用的滚动,或者至少是从纯 CSS 中知道它不滚动的一种方式,以避免使用 width: calc(100% - 17px);
【问题讨论】:
标签: html css mobile-chrome