本文介绍了HTML - 动态滚动条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 在'div'元素中,我将ContentPane的样式定义如下: < div id = rightPane dojotype = dijit.layout.ContentPane style = width:250px; overflow-x:scroll; overflow-y:scroll; region = right > 但是垂直滚动条(其中overflow-y:scroll或overflow-y:auto)d oes不能按需运行。有2个错误: 1)如果面板中的项目未展开,我希望滚动条处于隐藏状态。但是它总是打开,即使我设置overflow-y:auto。 2)当项目展开时,滚动条仍然表现得像以前一样,并且无法向下滚动。 我需要一个脚本来动态更改滚动条状态。希望你能帮助我完成这段代码。在此先感谢。解决方案 In a 'div' element, I defined the ContentPane's style as below:<div id="rightPane" dojotype="dijit.layout.ContentPane" style="width: 250px; overflow-x:scroll; overflow-y:scroll;" region="right">But the vertical scrollbar (where overflow-y:scroll or overflow-y:auto) does not function as needed. There are 2 bugs:1) If the items in the panel are not expanded, I want to the scrollbar in 'hidden' status. But it is always on even though I set overflow-y:auto.2) When the items are expanded, the scrollbar still behaves like it before, and can't be scrolled down.I need a script to dynamically change the scrollbar status. Hopefully you can help me for this piece of code. Thanks in advance. 解决方案 这篇关于HTML - 动态滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-16 04:34