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

How to change the cursor color from white to black when entering a specific element #39

Open vk-develops opened 6 months ago

vk-develops commented 6 months ago

I want to change my cursor color from white to black when entering a specific element because the element i have created has background color of white so while entering it i need to change the cursor to black

Some one please help me solve this issue.

Thank you in advance!!

vickkie commented 4 months ago

Solution

in your mouse follower CSS file add this line:

.mf-cursor.-inverse:before { background: #fff; }

then in your html

use : data-cursor="-inverse"

that should work