Just make a website, there is a page with other pages show a bit of discrepancy,
By observing and debugging, it is found that the vertical height of the page is not overflow,
Cannot call out a vertical scroll bar,
resulting in a distance of several pixels relative to the other page center,
Make the page effect not friendly.
Solution: Force all pages to add or hide the browser's scroll bar.
The relevant CSS code is as follows:
To force the display of scroll bars:
HTML {overflow:scroll;}
Force Hide scroll bar:
HTML {Overflow:hidden;}
To hide the horizontal scroll bar of IE:
HTML {overflow-x: hidden;}
To hide the vertical scroll bar for IE:
HTML {overflow-y: hidden;}
Force display of IE's horizontal scroll bar:
HTML {overflow-x: scroll;}
To force the display of the vertical scroll bar for IE:
HTML {overflow-y: scroll;}
Force display of Mozilla's horizontal scroll bar:
HTML {overflow:-moz-scrollbars-horizontal;}
Note: Only the horizontal scroll bar is forced to appear. That is, the vertical scroll bar does not appear even if you need to display a vertical scrollbar.
Force display of Mozilla's vertical scroll bar:
HTML {overflow:-moz-scrollbars-vertical;}
Note: Only the vertical scroll bar is forced to appear. That is, the horizontal scroll bar does not appear even if you need to display a horizontal scroll bar.
HTML about force display, hide browser scroll bar