【发布时间】:2023-01-26 23:14:23
【问题描述】:
我创建了一个动画https://designordering.com/resume/。我想在悬停时再次运行动画。
.circle1 {
fill: none;
stroke: #000;
stroke-width: 5px;
stroke-dasharray: 345;
stroke-dashoffset: 320;
animation: anim 2s linear forwards;
}
@keyframes anim {
100% {
stroke-dashoffset: 157.5;
}
}
/*I was trying this doesn't work*/
:hover {
animation-play-state: running;
}
<div class="app-skills">
<div class="app-circle">
<div class="outer">
<div class="inner">
<img class="app-logos" src="http://127.0.0.1:5500/img/Adobe-Illustrator.png" alt="js logo" width="35px">
</div>
</div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100px" height="100px">
<circle class="circle1" cx="45" cy="45" r="40"
stroke-linecap="round" />
</svg>
</div>
<div class="app-name">
<p>Adobe<br> Illustrator</p>
</div>
</div>
你能帮我提建议吗?太感谢了!
动画在页面加载时开始,但我想在有人将鼠标悬停在圆圈上时再次运行它。运行两次很重要(或者有人将鼠标悬停在上面的时间)。再次感谢您提出建议。
【问题讨论】: