admin管理员组

文章数量:1397219

First of all, I don't want to just remove it, I want to ensure that there is still scrolling capabilities there also.

This is because I would like to have a 'slide show' affect on the website, where you can click 'next' and before, however with the scroll bar there, you can just go through it.

I have hidden the scrollbar in other browsers using:

::-webkit-scrollbar { 
    display: none; 
}

for webkit browsers and overflow: -moz-scrollbars-none; for Firefox. However, when it es to IE, I can't find anything to simply hide it.

I found these on the internet:

scrollbar-3dlight-color:;
scrollbar-arrow-color:;
scrollbar-base-color:;
scrollbar-darkshadow-color:;
scrollbar-face-color:;
scrollbar-highlight-color:;
scrollbar-shadow-color:;

I thought by changing the colour to transparent, it would disappear, but it did not (just reverts back to normal).

Is there a way I can simply hide the scrollbar (simply like display:none or something else), in IE? I am open to css and js options.

jsFiddle of problem

NOTE: Adding overflow:hidden; stops the page from going past the second div when clicking the a tag.

First of all, I don't want to just remove it, I want to ensure that there is still scrolling capabilities there also.

This is because I would like to have a 'slide show' affect on the website, where you can click 'next' and before, however with the scroll bar there, you can just go through it.

I have hidden the scrollbar in other browsers using:

::-webkit-scrollbar { 
    display: none; 
}

for webkit browsers and overflow: -moz-scrollbars-none; for Firefox. However, when it es to IE, I can't find anything to simply hide it.

I found these on the internet:

scrollbar-3dlight-color:;
scrollbar-arrow-color:;
scrollbar-base-color:;
scrollbar-darkshadow-color:;
scrollbar-face-color:;
scrollbar-highlight-color:;
scrollbar-shadow-color:;

I thought by changing the colour to transparent, it would disappear, but it did not (just reverts back to normal).

Is there a way I can simply hide the scrollbar (simply like display:none or something else), in IE? I am open to css and js options.

jsFiddle of problem

NOTE: Adding overflow:hidden; stops the page from going past the second div when clicking the a tag.

Share Improve this question edited Jan 27, 2014 at 1:22 animuson 54.8k28 gold badges142 silver badges150 bronze badges asked Nov 27, 2013 at 11:35 AlbziAlbzi 15.6k6 gold badges48 silver badges67 bronze badges 6
  • Your edit shows a severe lack of both understanding the provided answer and proper use of the shift / caps lock key. – PeeHaa Commented Nov 27, 2013 at 11:41
  • I bolded it because I didn't want that answer @PeeHaa – Albzi Commented Nov 27, 2013 at 11:41
  • As I stated: lack of understanding – PeeHaa Commented Nov 27, 2013 at 11:42
  • I find this post quite offensive as the bold capital text feels quite shouty, we're here to help, not to take mands, if you need to explain something simply make your question clear instead of going bold-capslock mode. – SidOfc Commented Nov 27, 2013 at 11:42
  • @SidneyLiebrand, it's hard to convey how I am saying it. It's not that I am shouting, I just wanted to state that I wanted another method other than overflow:hidden;. Sorry. – Albzi Commented Nov 27, 2013 at 11:43
 |  Show 1 more ment

2 Answers 2

Reset to default 4

See here for fiddle using your current code

Try this trick

body, div, html{
    height:100%;
    width:100%;
    padding:0;
    margin:0;
}
body{
    overflow:hidden;
    position:fixed;
}
div{
    overflow-y:scroll;
    position:relative;
    right:-20px;
}

It offsets a scrollable div so its vertical scrollbar is outside the viewable area.

I have similar problem, I don't need scroll bars on main page, but i have to have inside of my page content like in div's and span's.

So I found solution like this:

body {
    -ms-overflow-style: none;
}
div, span {
    -ms-overflow-style: auto;
}

本文标签: javascriptRemoving IE39s scrollbarStack Overflow