开发者

Scrollbar flicker in AJAX-based site

开发者 https://www.devze.com 2023-04-13 02:30 出处:网络
Almost my whole site is on AJAX. I\'m using jQuery Address. I noticed a problem where when I go from page to page and the scrollbar is shown then hidden my whole page flickers / jumps and it\'s makin

Almost my whole site is on AJAX. I'm using jQuery Address.

I noticed a problem where when I go from page to page and the scrollbar is shown then hidden my whole page flickers / jumps and it's making my site look bad.

Is it okay if I do this?

html {
 width: 100%;
 height: 101%;
}

I found this solution googling, but some dude said it's bad He didnt mention why it's bad, though.

What do you guys do when you encounter this problem? Are there any other solutions? If you 开发者_开发问答can tell me the pros and cons of each solution that will be awesome. :)


You could use this instead:

html {
    overflow-y: scroll;
}

I suppose it's more explicit about your intentions.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号