Jump to content

mouseover transparency


cybernet

Recommended Posts

i have this to files

http://code.google.com/p/cyby/source/browse/trunk/js/cyber.js and

http://code.google.com/p/cyby/source/browse/trunk/css/cyber.css

 

i know this has 2 different topic for each one but together they create a usefull mouseover

 

what i'm trying to do is to make the mouseover transparent where can i change that

 

after a google search i know that "opacity:0.4;filter:alpha(opacity=40)" will do the trick but i have no idea where to edit

any help will be appreciated 

Link to comment
Share on other sites

thanks for the reply

this is the output of the mouseover ( without you're modification )

 

jpu83p.jpg

 

that background is #0e0d0b but i don't wanna change that, i just wanna make it transparent

 

like this ( i modified the image with gimp )

xfswzq.png

Link to comment
Share on other sites

well you add the stuff you find (I edited that a bit) and place it in the hover state,

 

So in case it's a div

<div class="transparent-class">your content</div>

with class transparent do this:

 

 

div.transparent-class:hover {
        filter:alpha(opacity=50);
        -moz-opacity:0.5;
        -khtml-opacity: 0.5;
        opacity: 0.5;
}

 

But you are going to have troubles with this because the transparent property of the div, is also the maximum transparency of the inner elements. (in other words you tect will become transparent too no matter what) Unless you use rgba, but that is not widely supported. So the best thing to do is create a tiny semi transparent giv in a color you like and let it repeat.

 

div.transparent-class:hover {
        background: url(../images/my-semi-trans-image.png) repeat;
}

 

That's how i do it (just pay attention IE6,5 don't support transparent png's that well but if you google, they made a nice script for it in JS)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.