Applying Hue Rotation on Image using CSS3

CSSWeb DevelopmentFront End Technology

To apply hue rotation in an image with CSS3, use the hue-rotate value for filter property.

Example

Let us see an example −

 Live Demo

<!DOCTYPE html>
<html>
<head>
<style>
img.demo {
   filter: hue-rotate(45deg);
}
</style>
</head>
<body>
<h1>Learn Spring Framework</h1>
<img src="https://www.tutorialspoint.com/spring/images/spring-mini-logo.jpg" alt="Spring Framework" width="160" height="150">
<h1>Learn Spring Framework</h1>
<img class="demo" src="https://www.tutorialspoint.com/spring/images/spring-mini-logo.jpg" alt="Spring Framework" width="160" height="150">
</body>
</html>

Output

raja
Published on 30-Dec-2019 10:03:38
Advertisements