“Zmień kolor Scrollbar” Kod odpowiedzi

Zmień kolor Scrollbar

.scrollable-element {
  scrollbar-color: red yellow; /* red is for the thumb and yellow is for the track */
}
Super Sloth

Kolor Scrollbar

<head>
    <style>
        .newScrollBar {
            scrollbar-3dlight-color: #4FBDDD;
            scrollbar-arrow-color: #EEE1AE;
            scrollbar-darkshadow-color: #000000;
            scrollbar-face-color: #A0CCE0;
            scrollbar-highlight-color: #F8F2DC;
            scrollbar-shadow-color: #176F99;
            scrollbar-track-color: #E7F2FA;

            overflow: scroll;
            width: 200px;
            height: 167px;
            border: 1px solid #cccccc;
        }
    </style>
</head>
<body>
    <div class="newScrollBar">
        Look at the colors of the scroll-bars.<br />
        ....................................................<br />
        ....................................................<br />
        Look at the colors of the scroll-bars.<br />
        ....................................................<br />
        ....................................................<br />
        Look at the colors of the scroll-bars.<br />
    </div>
</body>
Omar Mohamed

JavaScript on Scroll Change Kolor NAV

$(function () {
  $(document).scroll(function () {
    var $nav = $(".navbar-fixed-top");
    $nav.toggleClass('scrolled', $(this).scrollTop() > $nav.height());
  });
});
Filthy Falcon

Scrollbar z 2 różnymi kolorami na tej samej stronie CSS

::-webkit-scrollbar-track {
    background-color: #333;
}

/* Override styles for <div>s, for example */
div::-webkit-scrollbar-track {
    background-color: #b13131;
}
Coercivemessser

Odpowiedzi podobne do “Zmień kolor Scrollbar”

Pytania podobne do “Zmień kolor Scrollbar”

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu