成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

css3動(dòng)畫(huà) - css3 animation初始動(dòng)畫(huà)卡頓是怎么回事?

瀏覽:152日期:2023-06-30 18:58:24

問(wèn)題描述

問(wèn)題代碼:https://jsfiddle.net/zhoou/qd...

問(wèn)題解答

回答1:

@keyframes tiao{ 0%{ transform: translate(0,0);} 50%{ transform: translate(0,-20px);} 75%{ transform: translate(0,0);} 100%{ transform: translate(0,20px);}}

這么寫(xiě),不能在0%的時(shí)候就定義-20px,這樣會(huì)導(dǎo)致瞬間位移,所以看起來(lái)成了你說(shuō)的卡

回答2:

.cir li{ float: left; width: 20px; height: 20px; border-radius: 50%; margin:10px; background: #ccc; line-height: 20px; text-align: center;transform: translate(0,-20px);}

初始的時(shí)候加上-20px可以咯!

標(biāo)簽: CSS
相關(guān)文章: