我有一個(gè)冰山的標(biāo)志,我試圖通過增加和減少頂部邊距來模擬浮動(dòng)動(dòng)畫。我為此使用以下 css:img { height: 60px; padding: 5px; -webkit-animation: logofloat 1s ease-in-out infinite alternate; -moz-animation: logofloat 1s ease-in-out infinite alternate; animation: logofloat 1s ease-in-out infinite alternate;}@keyframes logofloat {from { margin-top: 0px; margin-top: 5px;}to { margin-top: 5px; margin-top: 10px;}}這是目前的樣子:https://gyazo.com/bbd8991a3e9a42148bb7677b85d0db3d動(dòng)畫有點(diǎn)斷斷續(xù)續(xù),有什么辦法可以讓它更流暢嗎?
讓 HTML/CSS 中的動(dòng)畫更加流暢
飲歌長(zhǎng)嘯
2023-11-13 11:04:40