【发布时间】:2017-12-29 06:45:43
【问题描述】:
我正在尝试在圆形 svg 上获得悬停过渡(不是完整的 360 度,大约 80%)。
根据我的理解,下面的代码应该可以,但是由于某种原因,它不仅会指向零点,还会添加额外的迷你拱门。如何避免?
.outer {
fill: transparent;
stroke: #333;
stroke-width: 3;
stroke-dasharray: 204;
stroke-dashoffset: 1;
transition: stroke-dashoffset 0.8s;
}
svg:hover .outer {
stroke-dashoffset: 204 !important;
}
<svg width="90" height="90">
<circle class="outer" cx="43" cy="43" r="40"/>
</svg>
【问题讨论】:
标签: html css svg css-transitions