[英]css hack for vertical scrollbars
if i make a div element have overflow:scrollbars i get both scroll bars vertical and horizontal all I want is the vertical scrollbars how do i accomplish that如果我让一个 div 元素溢出:滚动条我得到垂直和水平的滚动条我想要的只是垂直滚动条我怎么做到这一点
Instead of overflow
use overflow-y
in css.在 css 中使用
overflow-y
而不是overflow
。
overflow-y: String
溢出-y:字符串
Specifies how to handle content overflow of an element if the content is too tall for the element.
指定如果内容对于元素来说太高,如何处理元素的内容溢出。
Supported: IE 6.0+
支持:IE 6.0+
But might not support some browsers so its better if you design your div so that elements do not exceed the x limit.但可能不支持某些浏览器,因此如果您设计 div 以使元素不超过 x 限制,则效果会更好。
Here is your aswer这是你的回答
use overflow-y
使用
overflow-y
jscroll pane is very nice plugin for these kind of stuff jscroll 窗格是这类东西的非常好的插件
http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html http://www.kelvinluck.com/assets/jquery/jScrollPane/jScrollPane.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.