在CSS上滑块的开发过程中,发生以下问题。错误地执行animation-playstate属性。最重要的是,当您将光标移到幻灯片上时,动画应该暂停。鼠标离开动画后,它应该从当前位置继续。
codepen:https://codepen.io/Andrey_07/pen/bxyExZ
.clients-grid__column {
position: absolute;
top: 0;
left: 50%;
/* width: 160px;*/
width: 300px;
min-width: 300px;
margin-left: -160px;
transform-origin: center;
animation: columns-trajectory-1800 80s infinite;
animation-timing-function: linear;
will-change: transform;
animation-play-state: running;
-webkit-animation-play-state: running;
-moz-animation-play-state: running;
-o-animation-play-state: running;
-ms-animation-play-state: running;
}
.clients-grid__inner.stop .clients-grid__column {
animation-play-state: paused;
-webkit-animation-play-state: paused;
-moz-animation-play-state: paused;
-o-animation-play-state: paused;
-ms-animation-play-state: paused;
}