Home >Web Front-end >HTML Tutorial >Questions about scroll bars? _html/css_WEB-ITnose

Questions about scroll bars? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:01:16933browse





When my browser scroll bar ScrollTop is greater than 0, when I click the scroll bar of the first picture, the drop-down list disappears. Why is this?


Reply to discussion (solution)

The scroll bar must not have added document.documentElement.scrollTop, try adding it.

The scroll bar is definitely not added with document.documentElement.scrollTop, try adding it.



I don’t quite understand how this question is related to me?

What framework are you using? Which (first picture) pop-up layer is simulated with div?


Because no online address or code package is provided, this error can only be guessed. It is estimated that the positioning of this simulated drop-down table is done using absolute positioning, and then there is no enhancement to scrollTop, so it may be possible after clicking Even if the position changes, the top value of absolute positioning does not change. Therefore, it is recommended to add: document.documentElement.scrollTop and try this value. This value is scrollTop in the picture. If it doesn't work, that's not the reason.

I solved it myself. Although it didn't help me, I still thank you very much.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn