How To Create a Transparent Image

Posted by Lasantha Bandara File Under : css, html, image 0 Comment

When you add a image to your site, your code will look like this :

<img src="https://1.bp.blogspot.com/_-j7_-ccACuU/SuE7fKWtmEI/AAAAAAAAA98/c62rbwEGnyM/33473.jpg" alt="leaves" height="300" width="400" />

Result:
leaves

Now add style="opacity:0.4;filter:alpha(opacity=40)" to your code as below.

Now your code will look like this:

<img src="https://1.bp.blogspot.com/_-j7_-ccACuU/SuE7fKWtmEI/AAAAAAAAA98/c62rbwEGnyM/33473.jpg" alt="leaves" height="300" width="400" style="opacity:0.4;filter:alpha(opacity=40)" />

See the result:

leaves

Note: You can change 40 as your choice.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.