html 弹跳球
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了html 弹跳球相关的知识,希望对你有一定的参考价值。
<style>
#ball {
width: 100px;
height: 100px;
margin: 50px auto;
position: relative;
border-radius: 50%;
background: linear-gradient(
35deg,
#ccffff,
#ffcccc
);
animation-name: bounce;
animation-duration: 1s;
animation-iteration-count: infinite;
}
@keyframes bounce{
0% {
top: 0px;
}
50% {
top: 249px;
width: 130px;
height: 70px;
}
100% {
top: 0px;
}
}
</style>
<div id="ball"></div>
以上是关于html 弹跳球的主要内容,如果未能解决你的问题,请参考以下文章
OpenJudge百炼习题解答(C++)--题3142:球弹跳高度的计算
SkiaSharp 之 WPF 自绘弹跳球(案例版)
canvas弹跳球----源码分享与知识点总结
在 SpriteKit 中为弹跳球创建音效
Andengine Fixtures, Gravity, Mass - 永久弹跳球
javascript 弹跳球动画