Computer >> Máy Tính >  >> Lập trình >> CSS

Điều chỉnh độ bão hòa của hình ảnh bằng CSS3

Để bão hòa hình ảnh bằng CSS3, hãy sử dụng giá trị thuộc tính bão hòa cho thuộc tính bộ lọc.

Ví dụ

Hãy để chúng tôi xem một ví dụ để điều chỉnh độ bão hòa của hình ảnh -

<!DOCTYPE html>
<html>
<head>
<style>
img.demo {
   filter: saturation(500%);
}
</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>

Đầu ra

Điều chỉnh độ bão hòa của hình ảnh bằng CSS3