【问题标题】:Set SVG as mouse pointer image将 SVG 设置为鼠标指针图像
【发布时间】:2013-07-24 10:26:30
【问题描述】:

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

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

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

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

【问题讨论】:

    标签: jquery svg mouseover mouse-cursor


    【解决方案1】:

    这应该可以工作

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

    【讨论】:

    • SVG 文件是否必须是一种特殊的 SVG?
    猜你喜欢
    • 2010-10-15
    • 1970-01-01
    • 2011-11-11
    • 2018-02-08
    • 1970-01-01
    • 2011-11-13
    • 2012-06-05
    相关资源
    最近更新 更多