作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我只想在大于最大高度时才显示滚动条。但似乎滚动总是启用
<div style="text-align: left; font-size: 1.5rem; max-height: 7rem; overflow-y: auto;">
Some text
</div>
以我为例
最佳答案
使用 vh
而不是使用 rem
这意味着 font-size
而不是相对高度:
div {
text-align: left;
font-size: 1.5rem;
max-height: 10vh;
overflow-y: auto;
border: 1px solid red;
}
<div>
Some text Before Oracle9 if I had "select any table" privileges there was no problem doing so. ... allow direct access to the v$ tables, do not allow access by stored procedures ... I don't think O7_DICTIONARY_ACCESSIBILITY provides access to sys.link$
... Before Oracle9 if I had "select any table" privileges there was no problem doing so. ... allow direct access to the v$ tables, do not allow access by stored procedures ... I don't think O7_DICTIONARY_ACCESSIBILITY provides access to sys.link$ ...
https://jsfiddle.net/Manju06/3zshy8r0/34/ Before Oracle9 if I had "select any table" privileges there was no problem doing so. ... allow direct access to the v$ tables, do not allow access by stored procedures ... I don't think O7_DICTIONARY_ACCESSIBILITY
provides access to sys.link$ ...
</div>
关于HTML 仅在大于最大高度时才显示滚动条,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61368575/
我是一名优秀的程序员,十分优秀!