|
-
August 20th, 2008, 02:26 PM
#3
Re: JavaScript: making text appear onmouseover a different rect element
For the current case - as PeejAvery said.
Additionally for the future, for the cases when you need to change css of the same element you put mouse over.
In your attached CSS:
Code:
body {behavior:url(styles/csshover2.htc);}
/*
csshover2.htc is an IE hack file that makes IE6 understand "hover" css property
for all elements (originally IE6 has "hover" for <a> only);
csshover2.htc path should be set relatively to your html, not this css file;
it can be downloaded from here for ex.: http://www.xs4all.nl/~peterned/htc/csshover2.htc
*/
.class1 {color:#FF0000; border:1px solid #666666;}
.class1:hover {color:#FFFF00; border:1px solid #FFFFFF;}
It's that simple you just define the style for normal appearance, and the appearance when hover is on. If you attached csshover2.htc correctly this should work for any element in any browser. Some pretty nice buttons annimation can be made using this approach for ex. And with no need of javascript.
Wanna install linux on a vacuum cleaner. Could anyone tell me which distro sucks better?
I had a nightmare last night. I was dreaming that I’m 64-bit and my blanket is 32-bit and I couldn’t cover myself with it, so I’ve spent the whole night freezing. And in the morning I find that my blanket just had fallen off the bed. =S (from: bash.org.ru)
//always looking for job opportunities in AU/NZ/US/CA/Europe :P
willCodeForFood(Arrays.asList("Java","PHP","C++","bash","Assembler","XML","XHTML","CSS","JS","PL/SQL"));
USE [code] TAGS! Read this FAQ if you are new here. If this post was helpful, please rate it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|