Giter VIP home page Giter VIP logo

Comments (9)

idiotWu avatar idiotWu commented on June 18, 2024

Set overflow to any value except visible can resolve it.

from smooth-scrollbar.

designosis avatar designosis commented on June 18, 2024

I thought of this a few moments after posting ...

<scrollbar data-scrollbar style="max-height: 300px; overflow:hidden">

... duh :) I'm guessing this is what you meant by overscroll.

(Also, this would be an excellent thing to add to the docs.)

from smooth-scrollbar.

idiotWu avatar idiotWu commented on June 18, 2024

@neokio oh my fault, it should be overflow!

from smooth-scrollbar.

designosis avatar designosis commented on June 18, 2024

The more I work with your script, the more I realize how incredible it is.
It's everything I've ever wanted from a scroller!

While tweaking the CSS, there's something I can't seem to solve, maybe you have an idea.
See how nicely the thumb fits in the rounded top of the track here?

screen shot 2016-08-17 at 1 18 45 am

At the bottom, however, it sinks below the line ...

screen shot 2016-08-17 at 1 18 53 am

(The bottom curve of the thumb is cut off.)
Do you have any insight into how I can make the bottom fit nicely?

from smooth-scrollbar.

idiotWu avatar idiotWu commented on June 18, 2024

However, it seems to be OK in my demoπŸ˜•

screenshot

from smooth-scrollbar.

designosis avatar designosis commented on June 18, 2024

Ok good! Then it's something I messed up :)
Thank you for checking!

from smooth-scrollbar.

idiotWu avatar idiotWu commented on June 18, 2024

I'm wondering if you added vertical margin to the thumb like:

.scrollbar-thumb {
  margin: 2px;
}

If so, you should set the vertical one to 0 with:

.scrollbar-thumb {
  margin: 0 2px;
}

from smooth-scrollbar.

idiotWu avatar idiotWu commented on June 18, 2024

@neokio here's my suggestion for creating the little gaps:

.scrollbar-thumb {
    padding: 2px;
    box-sizing: border-box;
    background-clip: content-box; /* you may need `!important` rule here */
}

from smooth-scrollbar.

designosis avatar designosis commented on June 18, 2024

That worked perfectly.
Before, I made .scrollbar-thumb 8px wide, and .scrollbar-track-y 10px wide.
With the above change (!important was needed), they can be the same size.
VERY cool trick :)

from smooth-scrollbar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.