1
こんにちは私は両方のCSSトランジションとアニメーションを組み合わせるのに問題があります。アニメーションは機能していますが、トランジションを追加する何らかの理由で、トランジションは機能しますが、アニメーションが取り消されます。誰もそれらを組み合わせる方法を知っていますか?CSSトランジションとアニメーションを組み合わせる?
は、ここに私のCSSです:私はそれがコードの多くのですが、この質問のために必要な最小限のコードをthatsの知っている
.circle-spin {
transition: all 1s ease;
}
.circle-spin-reverse {
transition: all 1s ease;
}
.success li:hover .circle-spin-reverse {
animation:spin-reverse 10s linear infinite;
/* the above works until i add the transition below */
transform:scale(1.25);
}
.success li:hover .circle-spin {
animation:spin 10s linear infinite;
/* the above works until i add the transition below */
transform:scale(1.25);
}
@keyframes spin { 100% { -webkit-transform: rotate(360deg); transform:rotate(360deg); } }
@keyframes spin-reverse { 100% { -webkit-transform: rotate(360deg); transform:rotate(-360deg); } }
申し訳ありません。
おかげ
アニメーションは動作するためにトランジションを必要としません。また、必要なコード量の約5倍であるため、この例のすべてのブラウザ固有の定義を削除してみてください。その上に、あなたはあなたのHTMLを投稿しませんでした。 –
提案してくれてありがとう、私はそれを短くするために私のコードを編集 –