Change Color of SVG on Hover

Change Color of SVG on Hover

How can we change color of svg on hover ? We can change color of svg with fill attribute.

svg {
  width: 60px;
}

svg:hover {
  fill: #d85a5c;
  cursor: pointer;
}

SVG fill attribute

We can change color of svg with css and inline css.

Inline CSS
<svg fill="#4ebeee"></svg>
CSS
svg {
  width: 60px;
  fill: #4ebeee;
}
403 Views
85340cookie-checkChange Color of SVG on Hover

Leave a Reply

Your email address will not be published. Required fields are marked *