CSS Image Opacity/Transparency


Creating transparent images with CSS is easy.

Example 1: Creating a Transparent Image
First we will show you how to create a transparent image with CSS.

Regular Image The Same Image with Transparency

Look at the following source code:

 <img src="klematis.jpg" width="150" height="113" alt="klematis"
   style="opacity:0.4;filter:alpha(opacity=40)" />

Demonstration
The following demonstration shows how the script of HTML and CSS is displayed on the Web: