Change SVG icon color using inline css - HTML CSS SVG

HTML CSS examples for SVG:Line

Description

Change SVG icon color using inline css

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">

.my-svg path {<!--from www. j  a  v  a  2s.co  m-->
   fill: green;
}


      </style> 
 </head> 
 <body> 
  <svg class="my-svg" height="210" width="400"> 
   <path d="M150 0 L75 200 L225 200 Z" /> 
  </svg>  
 </body>
</html>

Related Tutorials