Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> CSS

การใช้ Hue Rotation บนรูปภาพโดยใช้ CSS3


หากต้องการใช้การหมุนสีในรูปภาพด้วย CSS3 ให้ใช้ค่าการหมุนสีสำหรับคุณสมบัติตัวกรอง

ตัวอย่าง

เรามาดูตัวอย่างกัน −

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

ผลลัพธ์

การใช้ Hue Rotation บนรูปภาพโดยใช้ CSS3