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

การใช้ความทึบกับรูปภาพโดยใช้ CSS3


หากต้องการใช้ความทึบกับรูปภาพ swith CSS3 ให้ใช้ค่าความทึบสำหรับคุณสมบัติตัวกรอง

ตัวอย่าง

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

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

ผลลัพธ์

การใช้ความทึบกับรูปภาพโดยใช้ CSS3