When mouse is over an image, possible to display an animation image?

Discussion in 'CSS' started by misohoni, Mar 21, 2006.

  1. #1
    I've seen how to create an image and use CSS, so that when the mouse is over the image - a new image appears.

    Is it still possible to replace the "mouseover" image with a gif anim in pure css?

    Thanks
     
    misohoni, Mar 21, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I am sure you could just replace the mouseover image with a gif animation but there may be better ways to do this.

    What sort of animation are you wanting?
     
    mad4, Mar 21, 2006 IP
  3. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #3
    A gif anim would be fine to use - just looking to push CSS really. It is possible to have a jpeg then when mouse is over, change to a gif? Never tried it...

    My example code is:
    #aboutmenu {
    left : 700px;
    width : 40px;
    }
    #aboutmenu A:hover {
    background : url(images/bbanav.gif) no-repeat -700px -30px;
    }
     
    misohoni, Mar 21, 2006 IP
  4. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I assume so, the css alters the image so the image type shouldn't make any difference.
     
    mad4, Mar 21, 2006 IP
  5. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #5
    Na, it doesn't work. Without using JS, using Pure CSS won't let you incorporate a gif anim
     
    misohoni, Mar 21, 2006 IP
  6. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Why not? See attached.
     

    Attached Files:

    FeelLikeANut, Mar 21, 2006 IP
  7. ramakrishna p

    ramakrishna p Notable Member

    Messages:
    1,798
    Likes Received:
    361
    Best Answers:
    0
    Trophy Points:
    240
    #7
    Checked. Your Gif animation is not working when the mouse hovered. CSS may not supporing.
     
    ramakrishna p, Mar 22, 2006 IP
  8. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    #8
    Did you save the gif anim on your computer and then test? I didn't test, but from what it looks like, seems ok..
     
    misohoni, Mar 22, 2006 IP
  9. FeelLikeANut

    FeelLikeANut Peon

    Messages:
    330
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Yes, you will have to click on the thumbnail and save the GIF. I tested it in FF and IE6 and it worked correctly.
     
    FeelLikeANut, Mar 22, 2006 IP
  10. ramakrishna p

    ramakrishna p Notable Member

    Messages:
    1,798
    Likes Received:
    361
    Best Answers:
    0
    Trophy Points:
    240
    #10
    Hope!

    You got answer for this thread!
     
    ramakrishna p, Mar 22, 2006 IP