【问题标题】:JointJS - How to change the colour of a link on hoverJointJS - 如何在悬停时更改链接的颜色
【发布时间】:2019-11-11 12:16:28
【问题描述】:

有谁知道当鼠标光标悬停在链接上时如何更改链接及其删除按钮的颜色?

JointJS 形状似乎是 SVG,如果我错了,请纠正我,但我认为我不能使用 CSS 来做到这一点...

【问题讨论】:

    标签: jointjs


    【解决方案1】:

    尝试在悬停时将线条颜色更改为红色:

    this.paper.on({
     'link:mouseenter': (linkView) => {
       linkView.model.attr('line/stroke', 'red');
     }
    });
    

    【讨论】:

      【解决方案2】:

      试试这个 愿你看起来像这样

      <!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>
      

      Check this:

      【讨论】:

      • 这与jointjs无关。问题是关于jointjs链接
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多