|
|
#1 |
|
Daemon Poster
Join Date: May 2009
Posts: 690
|
I am going to make a rollover image with JavaScript but then I saw on the net you can do it with CSS.
It loads all the images at one time and then goes through them wen the mouse is over it. Thy say make all your images in one a Sprite. But what is this and is it easyer and is there onother way?? |
|
|
|
|
|
#2 |
|
In Runtime
Join Date: Feb 2010
Posts: 141
|
Oh. My. God.
How many times have you asked questions like this!?! Just use Javascript, there is no difference! A guy gave you perfectly fine code to use!
__________________
You are such a good friend that if you and me were the last two people trapped on a sinking boat with only 1 life vest left, i would remember and pray for you every day. Funny how Communism is so bad in Politics but so good with software! My reputation is in the Red, so why doesnt it say "ohm55 needs rehab" when I put my mouse over it? |
|
|
|
|
|
#3 |
|
In Runtime
|
I agree my code is perfectly good to use. However if you wish to use CSS, here you go:
Place this between <head></head> tags: Code:
<style type="text/css">
#img {
background-image:url('PATH/TO/IMAGE1.gif);
}
#img:hover {
background-image:url('PATH/TO/IMAGE2.gif);
}
</style>
Code:
<div id="img"></div> |
|
|
|
|
|
#4 |
|
ಠ_ಠ
Join Date: May 2009
Location: 'Murica!
Posts: 9,037
|
What is this I don't even...
__________________
Desktop: PII 955, 4GB DDR3 1333, M4A79T, 250GB 7200.10, HD 5770, 3x HG281D Laptop: Q9000, 4GB DDR3, DV7 mb, 40GB Hitachi, HD 4650M, 23" AOC LED backlit panel Netbook: Pink ASUS 1005HAB, Atom N270, 1GB DDR2, 160GB HDD, Intel 945G, 63 Whr battery |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|