This is a discussion on "Opacity" within the Web Page Design section. This forum, and the thread "Opacity are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Opacity
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Opacity
Hello
I wonder if someone can tell me whether or not it is possible to ADD opacity to images using :hover in my stylesheet, as in: #rightarea { .. some images .. opacity: 0.6; } #rightarea img:hover { opacity: 1.0; } So far it seems to be additive but only in a take-away sense, so if I had opacity: 0.8 it would ADD to the already present 0.6 to make it even less opaque, but 1.0 will do nothing, nor will 1.6 or other values greater than 1.0 Any suggestions or help? Here's my page: http://www.jonathanmortimer.co.uk/te...flatlinks.html Last edited by jonnymorris; Jul 20th, 2007 at 19:47. |
|
|
|
||||
|
Re: Opacity
there is no such thing as opacity in CSS.. That i know of anyway.
|
|
|||
|
Re: Opacity
Quote:
|
|
|||
|
Re: Opacity
Oh it's OK, I moved my opacity declaration to a different tag in my stylesheet and now it works. I'm still getting the hang of this!
|
|
||||
|
Re: Opacity
What tag did you move it to, out of interest?
|
|
|||
|
Re: Opacity
Quote:
http://www.w3schools.com/css/css_image_transparency.asp just a lot more complex than just "opacity:0.5;" |
|
|||
|
Re: Opacity
I created thumbnails as a class, thus:
.thumbnails img { opacity: 0.6; } .thumbnails img:hover { opacity: 1.0; } The thumbnails class div surrounds all my thumbnail images. It's a little more complex though as I also want it to swap the main image AND swap some text (the image caption), I found snippets of code to do this in javascript but they both relied on mouseover, so for the time-being changed one to mousedown and another to mouseup. Eventually I should have both things done on just the one mouse action, but I'm not that good with javascript yet and don't know exactly what goes where. That's another topic though, I think! |
|
|||
|
Re: Opacity
Quote:
I'll think about those hurdles when I come to them Thanks for the link! |
|
||||
|
Re: Opacity
For IE: filter:alpha(opacity=80);
For FF etc..: -moz-opacity:.80; For everything else: opacity:.80;
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
![]() |
| Tags |
| opacity |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| css-opacity | motormaniac | Web Page Design | 5 | Apr 16th, 2008 08:16 |
| IE not setting opacity correctly | djeyewater | JavaScript Forum | 4 | Feb 8th, 2008 09:57 |
| css opacity effect | RZX Developer | Web Page Design | 6 | Aug 7th, 2007 19:05 |
| CSS opacity works in FF but not IE? | WebNinja | Web Page Design | 5 | Feb 25th, 2007 22:14 |
| Weird Opacity behavior in PS 7 | autumn_whispers2me | Graphics and 3D | 0 | May 3rd, 2005 22:24 |