How to use opacity property to specify the transparency of an image in CSS

1 Answer

0 votes
<!DOCTYPE html> 
<html> 
    <head>
        <style>
            img {
                opacity: 0.5;
                filter: alpha(opacity=50);
            }
        </style>
    </head>

    <body>
        <img src="https://cdn.pixabay.com/photo/2019/09/15/14/22/coast-4478424_960_720.jpg"> 
    </body> 
</html>

 



answered Oct 11, 2019 by avibootz
...