鼠标悬停时,光标变为按钮形式

时间:2015-02-02 23:20:07

标签: javascript d3.js

我需要帮助我的d3.js.有人可以帮我实现一个功能,鼠标悬停在光标上变成“点击”光标形式?例如,当您单击鼠标悬停在堆栈上的按钮溢出时,光标会发生变化。

.on("mouseover", function() {
        d3.select(this)
            .style("fill", "#3b6887");

    })

1 个答案:

答案 0 :(得分:0)

查看可用的不同游标,您可以使用cursor CSS | MDN

尝试以下

.on('mouseover', function() {
    d3.select(this)
        .style('fill', '#3b6887')
        .style('cursor', 'pointer');
});