【发布时间】:2019-11-11 12:16:28
【问题描述】:
有谁知道当鼠标光标悬停在链接上时如何更改链接及其删除按钮的颜色?
JointJS 形状似乎是 SVG,如果我错了,请纠正我,但我认为我不能使用 CSS 来做到这一点...
【问题讨论】:
标签: jointjs
有谁知道当鼠标光标悬停在链接上时如何更改链接及其删除按钮的颜色?
JointJS 形状似乎是 SVG,如果我错了,请纠正我,但我认为我不能使用 CSS 来做到这一点...
【问题讨论】:
标签: jointjs
尝试在悬停时将线条颜色更改为红色:
this.paper.on({
'link:mouseenter': (linkView) => {
linkView.model.attr('line/stroke', 'red');
}
});
【讨论】:
试试这个 愿你看起来像这样
<!DOCTYPE html>
<html>
<head>
<style>
/* unvisited link */
a:link {
color: red;
}
/* visited link */
a:visited {
color: green;
}
/* mouse over link */
a:hover {
color: blue;
}
/* selected link */
a:active {
color: blue;
}
</style>
</head>
<body>
<p><b><a href="default.asp" target="_blank">This is a link</a></b></p>
<p><b>Note:</b> a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.</p>
<p><b>Note:</b> a:active MUST come after a:hover in the CSS definition in order to be effective.</p>
</body>
</html>
【讨论】: