font - HTML CSS CSS Animatable Property

HTML CSS examples for CSS Animatable Property:font

Introduction

Only the font-size, font-weight, font-stretch, and line-height properties are animatable in CSS among all the individual font properties.

-webkit- prefix is for Chrome, Safari, Opera.

-moz- prefix is for Firefox.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html lang="en">
 <head>
  <title>Example of CSS font Property Animation</title>
  <style type="text/css">
.animated {<!--   w w  w . j  av  a2 s  . co  m-->
    -webkit-animation: test 4s infinite; 
    animation: test 4s infinite;
}

@-webkit-keyframes test {
    50% {font: 42px bold;}
}

@keyframes test {
    50% {font: 42px bold;}
}
</style>
 </head>
 <body>
  <p> </p>
  <p class="animated">This is an animated paragraph.</p>
 </body>
</html>

Related Tutorials