Animate svg rect to grow - HTML CSS SVG

HTML CSS examples for SVG:Rectangle

Description

Animate svg rect to grow

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
 </head> <!--from  www  . j a  v a 2s .  co  m-->
 <body> 
  <svg version="1.1" id="MAIN" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewbox="0 0 1190.6 841.9" enable-background="new 0 0 1190.6 841.9" xml:space="preserve"> 
   <rect id="barchart1" x="148.8" y="190" fill="#921930" width="39.8" height="27.5"> 
    <animate attributeName="height" from="0" to="27.5" dur="3s" fill="freeze" /> 
    <animate attributeName="y" from="190" to="162.5" dur="3s" fill="freeze" /> 
   </rect> 
  </svg>  
 </body>
</html>

Related Tutorials