admin管理员组文章数量:1417686
I have done lots of research on popular websites but I am unable to find this bouncing and flying animation.
Demo
I want to add flying and bouncing watermark on my webpage.
I have done lots of research on popular websites but I am unable to find this bouncing and flying animation.
Demo
I want to add flying and bouncing watermark on my webpage.
Share Improve this question edited Dec 18, 2016 at 0:00 halfer 20.4k19 gold badges109 silver badges202 bronze badges asked Dec 16, 2016 at 5:00 Risky JattRisky Jatt 311 silver badge5 bronze badges 03 Answers
Reset to default 4the bounce and flying effect you can develop using translate
function
#circle{
width:50px;
height:100px;
background:red;
border-radius:50%;
margin-top:100px;
}
p{
text-align:center;
color:yellow;
}
.bounce{
animation:bounce 5s linear 100;
}
@keyframes bounce{
0%{
transform:translate(0px,0px);
}
25%{
transform:translate(100px,100px);
}
50%{
transform:translate(200px,0px);
background:green;
}
75%{
transform:translate(100px,-100px);
}
100%{
transform:translate(0px,0px);
}
}
<div id="circle" class="bounce"><p> your text here</p></div>
body { background: #222; }
.box {
background-color: #61ab20;
margin: 0 auto;
width: 500px;
height: 300px;
position: relative;
box-shadow: inset 0 0 3px #000;
border-radius: 5px;
border: 1px solid #111;
overflow: hidden;
}
.box b {
display: block;
width: 20px;
height: 20px;
border-radius: 50%;
background-color: #3673cf;
box-shadow: inset -5px -5px 5px rgba(0,0,0,.6), 15px 15px 2px rgba(0,0,0,.04);
position: absolute;
-webkit-animation: moveX 3.05s linear 0s infinite alternate, moveY 3.4s linear 0s infinite alternate;
-moz-animation: moveX 3.05s linear 0s infinite alternate, moveY 3.4s linear 0s infinite alternate;
-o-animation: moveX 3.05s linear 0s infinite alternate, moveY 3.4s linear 0s infinite alternate;
animation: moveX 3.05s linear 0s infinite alternate, moveY 3.4s linear 0s infinite alternate;
}
@-webkit-keyframes moveX {
from { left: 0; } to { left: 480px; }
}
@-moz-keyframes moveX {
from { left: 0; } to { left: 480px; }
}
@-o-keyframes moveX {
from { left: 0; } to { left: 480px; }
}
@keyframes moveX {
from { left: 0; } to { left: 480px; }
}
@-webkit-keyframes moveY {
from { top: 0; } to { top: 280px; }
}
@-moz-keyframes moveY {
from { top: 0; } to { top: 280px; }
}
@-o-keyframes moveY {
from { top: 0; } to { top: 280px; }
}
@keyframes moveY {
from { top: 0; } to { top: 280px; }
}
<div class="box"><b></b></div>
Try this, it my be helpfull...
Very simple use animate CSS https://daneden.github.io/animate.css/
It is very simple.
本文标签: javascriptBouncing text animation like DVDStack Overflow
版权声明:本文标题:javascript - Bouncing text animation like DVD - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745263607a2650468.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论