admin管理员组文章数量:1392076
I want to set icon as curse pointer in JavaScript. I try some default cursor style. See below code.
<span style="cursor:pointer">auto</span><br>
But I want to set my icon as cursor. Example:- "cursor : My Icon" .
How would i set this in CSS?
I want to set icon as curse pointer in JavaScript. I try some default cursor style. See below code.
<span style="cursor:pointer">auto</span><br>
But I want to set my icon as cursor. Example:- "cursor : My Icon" .
How would i set this in CSS?
Share Improve this question asked Feb 27, 2015 at 11:14 chiragchirag 1,8281 gold badge16 silver badges36 bronze badges3 Answers
Reset to default 5You should used cursor: url(image.png) like:
span {
cursor: url(cursor.png), auto;
}
Try this CSS:
span{ cursor:url('http://www.dolliehost./dolliecrave/cursors/cursors-all/animals01.gif'), auto }
FIDDLE
The other answers are correct, but if you want to do it in jquery you can do this:
$('selector').css( 'cursor', 'url(cursor.ico)' );
本文标签: javascriptSet icon as cursor pointer in CSSStack Overflow
版权声明:本文标题:javascript - Set icon as cursor pointer in CSS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744781707a2624754.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论