Div控制滚动位置设置不正确.

编程入门 行业动态 更新时间:2024-10-28 18:32:15
本文介绍了Div控制滚动位置设置不正确.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

步骤:1)我在一个主div控件上添加了20个子div.主div控件的高度是固定的,并且将滚动属性分配给了主div. 2)当我尝试将滚动位置0移到100时(现在滚动位于子div 6). 3)动态地,第一个隐藏控件的高度将根据内容而增加(该内容可能包含控件或文本). 4)增加动态隐藏控件的高度时,滚动位置将移动到子div6,但现在滚动位置在子div1. ----------------------------------------------- 第四步是我的问题.

Step: 1) I added 20 child div''s to one main div control.The main div control height is fixed and i assigned scroll property to main div. 2) When i am trying to move scroll position 0 to 100 (now scroll is at child div 6). 3)Dynamically the first hidden control height will be increased based on content (that content might be contain controls or text). 4)When dynamically hidden control height is increase the scroll position will move to child div6, but right now the scroll position is at child div 1. ----------------------------------------------- 4th step is my problem.

推荐答案

它看起来好像不是您正在回答,但是,您需要发布代码,但是如果您使用javascript,您也可以在Chrome中对其进行调试,这是解决大多数JS问题的最佳方法 It doesn''t look like you''re answering, but, you need to post code, but if you''re working with javascript, you can also debug it in Chrome, that''s the best way to solve most JS issues

更多推荐

Div控制滚动位置设置不正确.

本文发布于:2023-10-08 02:15:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1471220.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不正确   位置   Div

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!