【发布时间】:2021-12-23 08:55:37
【问题描述】:
由于某种原因,:hover 和链接在 Firefox 中无法与 clip-path 结合使用。用 Chrome 没问题。我需要clip-path 才能工作。我知道它可以在没有属性的情况下工作。但是,我不能删除此属性。
知道为什么吗?
简化示例:
<svg xmlns="http://www.w3.org/2000/svg" height="210" width="400">
<style>
path {
fill: blue;
}
path:hover {
fill: red;
}
</style>
<a target="_parent" href="/test">
<path id="triangle" clip-path="url('#triangle-clip')" d="M150 0 L75 200 L225 200 Z">
<title>Triangle</title>
</path>
</a>
<clipPath id="triangle-clip">
<use href="#triangle" />
</clipPath>
</svg>
【问题讨论】:
标签: css svg firefox pseudo-class