Acest cod se adauga in CSS unde ai o imagine pe care vrei sa o afisezi si sa fie doar putin vizibila

filter:alpha(opacity=85); -moz-opacity:0.85; opacity:0.85; -khtml-opacity:0.85;


Exemplu 1: Crearea unei imagini transparente

Intai vom vedea o imagine transparenta cu ajutorul CSS

Imaginea normala:


Aceeasi imagine, dar transparenta:


Priveste schimbarea din codul de mai jos:
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBnY48jFxaF0nVZabqUxSJGCFaMBDl3n086s_2F-grkpei29t9z2PAkWt4ZroqTvZNfjr4WAevsjGI3RSLNg8KYSpWt0jDLaxpcLNWtnqunHaTPQGEFKV_wW7jVrjVx6Uor63j-N-eKoo/s1600/b.jpg" width="441" height="80" style="opacity:0.4;filter:alpha(opacity=40)">

Firefox foloseste proprietatea opacity:x pentru transparenta, in timp ce IE folososte filter:alpha(opacity=x).

Exemplu 2: Imagine transparenta - Efect Cursor Deasupra



  <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBnY48jFxaF0nVZabqUxSJGCFaMBDl3n086s_2F-grkpei29t9z2PAkWt4ZroqTvZNfjr4WAevsjGI3RSLNg8KYSpWt0jDLaxpcLNWtnqunHaTPQGEFKV_wW7jVrjVx6Uor63j-N-eKoo/s1600/b.jpg" style="opacity:0.4;filter:alpha(opacity=40)" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" onmouseout="this.style.opacity=0.4;this.filters.alpha.opacity=40" >