[英]How to make scroll bar appear only when the window size gets increased
I have a UI which consists of drag and drop . 我有一个由拖放组成的UI。 I have a tree structure on left side . 我的左侧是树形结构。 I have to drag an item from the tree structure from left side and drop it as a composite to my right side. 我必须从左侧的树形结构中拖动一个项目,然后将其作为组合拖放到我的右侧。 So when the number of composites increases on my right side then scroll bar should appear. 因此,当我右边的合成材料数量增加时,应该会出现滚动条。 But my scroll bars are visible before the number of composites are getting increased. 但是在增加复合材料的数量之前,可以看到我的滚动条。 Even if I set showScollbar(false) even then I have the problem. 即使我设置showScollbar(false),我也有问题。
For example your right side div in which you drop the element have id right like 例如,您在其中放置元素的右侧div具有正确的ID,例如
<div id="right">
then write in css file as follows 然后在css文件中写入如下
#right { overflow: hidden;}
#right:hover {overflow: auto;}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.