How to make transparent image with CSS

Balinese Child
Look at Images right side…!
If your pointer over on the image, you will see change to be real opacity.

In this time I will show you how to make a transparent image with CSS.


Example source code

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “”>
<html xmlns=””>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Transparency Images</title>
<style type=”text/css”>
#img-roll1, #img-roll2 {
#img-roll1 {
border:#666600 1px solid;
#img-roll2 {
border:#666600 1px solid;
margin-bottom:10px; }
<img id=”img-roll1″ onmouseover=”;this.filters.alpha.opacity=100″ onmouseout=”;this.filters.alpha.opacity=40″ src=”” alt=”Besakih Temple” width=”290″ height=”218″ /> <img id=”img-roll2″ onmouseover=”;this.filters.alpha.opacity=100″ onmouseout=”;this.filters.alpha.opacity=40″ src=”” alt=”Balinese Child” width=”290″ height=”218″ />

So, Copy and paste HTML Code above, and than see the result in your browser….

7 tanggapan untuk “How to make transparent image with CSS

  1. Ivan Kristianto Balas

    Great tutorial gusdwi. Looks like i have to learn a lot about css to you. Thanks for sharing it with us 🙂
    Keep posting and happy blogging…

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *