Cursor .svg not working in Chrome 61.0.3163.100

时间:2017-10-12 10:05:48

标签: css google-chrome cursor

I have an issue with this css.
I tried both auto and default but still I see the default cursor.

cursor: url('img/extra/arrow-next.svg'), auto;
cursor: url('img/extra/arrow-next.svg'), default;

Anyone has the same problem or am I doing something wrong?

1 个答案:

答案 0 :(得分:3)

您可能没有指定SVG文件的高度和宽度。因此,您的浏览器无法将其用作游标。要将此SVG文件用作游标,请在文本编辑器中将其打开并将其更改为类似于此的内容:

<svg height="20" width="20"> ... </svg>

当这个改变时,这个CSS代码应该可以解决这个问题:

cursor: url('img/extra/arrow-next.svg'), auto;