CSS3-এ ইমেজে অপাসিটি প্রয়োগের জন্য filter প্রপার্টির opacity() ফাংশন ব্যবহার করুন।
উদাহরণ: ৬০% অপাসিটি
<!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>
আউটপুট

opacity() vs opacity প্রপার্টি
| বৈশিষ্ট্য | filter: opacity() | opacity প্রপার্টি |
|---|---|---|
| প্রভাবিত এলিমেন্ট | শুধু ইমেজ/এলিমেন্টের কন্টেন্ট | এলিমেন্ট + সকল চাইল্ড |
| পারফরম্যান্স | GPU অ্যাক্সিলারেটেড | সাধারণ |
| এনিমেশন | স্মুথ | স্মুথ |