2013年10月11日 星期五

browser-flow chart browser-scrollbar-hidden


browser-scrollbar-hidden

$("body").css("overflow", "hidden");

<style>
 body {width:100%; height:100%; overflow:hidden, margin:0}
 html {width:100%; height:100%; overflow:hidden}
</style>

function reloadScrollBars() {
    document.documentElement.style.overflow = 'auto';  // firefox, chrome
    document.body.scroll = "yes"; // ie only
}

function unloadScrollBars() {
    document.documentElement.style.overflow = 'hidden';  // firefox, chrome
    document.body.scroll = "no"; // ie only
}



IE has some bug with the scrollbars. So if you want either of the two, you must include the following to hide the horizontal scrollbar:
overflow-x: hidden; overflow-y:scroll;
and to hide vertical:
overflow-y: hidden; overflow-x: scroll;

沒有留言:

張貼留言