将SVG设置为鼠标指针图像

时间:2013-07-24 10:26:30

标签: jquery svg mouseover mouse-pointer

我有一个svg图像。我需要使用javascript将svg图像设置为鼠标指针。

我可以使用以下代码将图像设置为鼠标指针:

  $("div").mouseover(function(){
            $(this).attr("style","cursor: url(red_bucket.png), pointer;");
        });

是否有可能将svg设置为鼠标指针......?

1 个答案:

答案 0 :(得分:2)

这应该有效

    $("div").mouseover(function(){
        $(this).attr("style","cursor: url('red_bucket.svg'), pointer;");
    });
相关问题