SVG polygon points with percentage units support - HTML CSS SVG

HTML CSS examples for SVG:polygon

Description

SVG polygon points with percentage units support

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">

#svg-container {<!-- ww  w .j  av a2 s  . c  om-->
   width: 100%;
   height: 100%;
}


      </style> 
 </head> 
 <body> 
  <div id="svg-container"> 
   <svg width="100%" height="100%" viewbox="0 0 100 100" preserveaspectratio="none" style="background-color: whitesmoke"> 
    <rect x="40%" y="40%" width="25%" height="25%" /> 
    <polygon points="0,0 0,100 30,20 30,0" /> 
    <polygon points="30,0 30,20 60,0 60,0" /> 
    <polygon points="60,0 60,0 90,30 90,0" /> 
   </svg> 
  </div>  
 </body>
</html>

Related Tutorials