Live2d Test Env

css3小球上下移动效果

.ball-item {
height: 96px;
width: 96px;
display: flex;
justify-content: center;
align-items: center;
background: url('@/assets/nav-big-screen/ball.png') no-repeat 100% /100% 100%;
color: #fff;
font-size: 16px;
margin-right: 18px;
animation-name: tossing;
animation-duration: 3.5s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
&:hover {
// 鼠标经过时,暂停动画
animation-play-state: paused;
}
}
// 球球
@keyframes tossing {
0% {
transform: translateY(10%);
}
50% {
transform: translateY(4%);
}
100% {
transform: translateY(10%);
}
}

效果如下:

以上

posted @   致爱丽丝  阅读(32)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
点击右上角即可分享
微信分享提示