Create a Transparent Image with CSS



To create a transparent image, use the CSS -moz-opacity property. You can try to run the following code to style an image and set opacity with CSS:

Example

<html>
   <head>
   </head>
   <body>
      <img style = "moz-opacity:0.2;filter:alpha(opacity=50);" src = "https://www.tutorialspoint.com/assets/videotutorials/courses/css_online_training/380_course_215_image.jpg" />
   </body>
</html>
Updated on: 2020-01-31T06:57:33+05:30

193 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements