+ 1
How can i make animation like letters becoming smaller to bigger
write the correct
2 Respuestas
+ 15
var stp = 1;
window.onload = function() {
t = setInterval(grow,100);
};
function grow() {
document.getElementsByTagName("p")[0].style.fontSize = stp+++"px";
if (stp == 41) {
clearInterval(t);
}
}
+ 3
Why did you have tagged 'tables' in your question?
Anyway, you can do animations with Css also:
<div id="anim">animating <span class='small2big'>font-size</span> property</div>
<style>
#anim {
font-size:16px;
height:48px;
line-height:48px;
}
.small2big {
animation-name: animName;
animation-duration: 2s;
animation-timing-function:linear;
animation-iteration-count:infinite;
}
@keyframes animName {
from { font-size: 16px; }
50% { font-size: 24px; }
to { font-size: 16px; }
}
</style>