3

The problem is scrollbar always shows up when I move my mouse inside body after I link bootstrap style.

At the beginning, the scrollbar is hidden. It is working fine. But when I hover the mouse in the body area and toggle the mouse wheel, the scrollbar shows up. I have set the overflow to hidden. But the issue still here.

The code snippet is below:

<!DOCTYPE html>
<html>
<head>
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <style>
        html, body {
            overflow: hidden;
        }
    </style>
</head>
<body>
</body>
</html>
Siguza
  • 21,155
  • 6
  • 52
  • 89
Robert
  • 31
  • 1

2 Answers2

1

You can use vendor specific -ms-overflow-style-property to control the scrolling/scrollbar behavior on IE

html, body {
    -ms-overflow-style: none;
}

Note that it only applies on elements with overflow property set and it only works on Windows 8 and up.

-ms-overflow-style property on MSDN

Pete TNT
  • 8,293
  • 4
  • 36
  • 45
tojowe
  • 101
  • 1
  • 8
0

This might help you. Refer to this QUESTION

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

This worked fine for me.

Community
  • 1
  • 1
jofftiquez
  • 7,548
  • 10
  • 67
  • 121