CSS прокрутка не работает в Internet Explorer / FireFox / Edge - PullRequest
0 голосов
/ 13 мая 2018

Я использую этот CSS-код для настройки стиля полосы прокрутки:

::-webkit-scrollbar {
      width: 8px;
} /* this targets the default scrollbar (compulsory) */

::-webkit-scrollbar-track {
      background-color: black;
} /* the new scrollbar will have a flat appearance with the set background color */

::-webkit-scrollbar-thumb {
      background-color: #59e5f6;
      border-radius: 10px;
} /* this will style the thumb, ignoring the track */

::-webkit-scrollbar-button {
      background-color: black;
} /* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */

::-webkit-scrollbar-corner {
      background-color: black;
} /* if both the vertical and the horizontal bars appear, then perhaps the right bottom corner also needs to be styled */

body {
    scrollbar-face-color: black;
}

Он отлично работает в Chrome, но не в Explorer / FireFox / Edge.

Doу тебя есть идеи как это исправить?

Спасибо!

1 Ответ

0 голосов
/ 31 мая 2019

Это не поддерживается в IE, Edge и Firefox по умолчанию.Вот скриншот из документации https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-scrollbar

enter image description here

Примечание: Вы можете использовать библиотеки JavaScript, такие как perfect-scrollbar

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...