'Replace all cursor in tailwindcss
How to replace all cursors with my custom image in tailwindcss?
My attempt
In tailwind.config.js:
module.exports = {
theme: {
extend: {
cursor: {
default: "url(/images/cursor.png)",
pointer: "url(/images/cursorPointer.png)",
},
},
},
};
Answer:
In global.css:
*,
*:before,
*:after {
@apply cursor-default;
}
a, button {
@apply cursor-pointer;
}
In tailwind.config.js:
module.exports = {
theme: {
extend: {
cursor: {
default: 'url(/images/cursor.png), default',
pointer: 'url(/images/cursorPointer.png), pointer',
},
},
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
