Jump to content

Recommended Posts

Posted

//modificarea transparentei la mouseover

//cand mutam cursorul mouse-ului in afara imaginii, aceasta trebuie sa redevina transparenta. Acest lucru este realizat de atributul onmouseout.

<img src="imagine1.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" />

//In IE ( filter:alpha(opacity=x) ), x poate lua valori de la 0 la 100. La fel ca in Firefox, cu cat valoarea este mai mica, cu atat elementul este mai transparent.


//in cel de al doilea caz imaginea este transparenta pana la prima mutare a cursorului mouse-ului

<img src="imagine2.jpg" style="opacity:0.4;filter:alpha(opacity=40)" 

onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" />

  • Upvote 1

Posted

Dar daca folosim codul in genul asta:

<style type="text/css">

img.c1 {opacity:0.4;filter:alpha(opacity=40)}

</style>

<img src="imagine1.jpg" class="c1" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" onmouseout="this.style.opacity=0.4;this.filters.alpha.opacity=40" alt="** please DESCRIBE THIS IMAGE **">

Nu este la fel? Si astfel avem si un cod valid, pentru cei care doresc asta

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.