标签: reactjs
我想在用户将鼠标移到 .我可以指定系统默认游标,这很好用,但我不能让自定义游标工作;
import CustomCursor from '../custompointer.svg'; ... <div style={{ cursor: 'url(' + CustomCursor + ', auto)' }}>
我在网上看到了一些解决方案,但对于我认为是一个简单的解决方案来说,这些解决方案很冗长。
答案 0 :(得分:0)
更改您的代码:
cursor: 'url(' + CustomCursor + ', auto)'
到
cursor: "url(" + CustomCursor + "), auto"
Demo