change both fill and stroke in svg with css on hover - HTML CSS SVG

HTML CSS examples for SVG:polygon

Description

change both fill and stroke in svg with css on hover

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:hover {<!--from  ww w . ja  v  a  2s  . c  om-->
   color:#dd6127;
}


      </style> 
 </head> 
 <body> 
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="460px" height="400px" viewbox="0 0 460 400" enable-background="new 0 0 460 400" xml:space="preserve"> 
   <circle fill="none" stroke="currentColor" stroke-width="30" stroke-miterlimit="10" cx="232.083" cy="200.002" r="182.624" /> 
   <g> 
    <polygon fill="none" stroke="currentColor" stroke-width="16" stroke-miterlimit="10" points="248.075,180.326 168.244,97.687
      207.524,205.666    " /> 
    <polygon fill="currentColor" stroke="currentColor" stroke-width="16" stroke-miterlimit="10" points="256.642,194.337 295.922,302.315 216.09,219.677    " /> 
   </g> 
  </svg>  
 </body>
</html>

Related Tutorials