Cuberto / mouse-follower

A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website.
MIT License
724 stars 60 forks source link

Two state at the same time. #11

Open nurpais opened 1 year ago

nurpais commented 1 year ago

is it possible to enable two states at the same time?

I want to set a img and text to the cursor, the picture and text are displayed, but without the text background.

I apologize if I missed something in the documentation. Thank you!

image

Drafteed commented 1 year ago

Hello! This is a non-standard case and requires customization via CSS.

Example:

.mf-cursor {
    &.-video.-text {
        width: auto;
        height: auto;
        top: auto;
        left: auto;
        z-index: 10;
        transform: translate(-50%, -50%);
        padding: 20px;

        background: currentColor;
        border-radius: 50%;
    }
}
nurpais commented 1 year ago

Good! Thank you. It would be cool if it all worked by default, without additional CSS.