Results 1 to 4 of 4

Thread: [CSS] Simple image rollover effects

  1. #1
    Join Date
    Jun 2008
    Location
    Adelaide, Australia
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default [CSS] Simple image rollover effects

    1) CODE TITLE: Simple CSS based image rollover effects

    2) AUTHOR NAME/NOTES: Anthony McCreath

    3) DESCRIPTION:
    Have an image change when hovering over it, without using javascript

    4) URL TO CODE:
    http://www.mccreath.org.uk/Article/S...effects_6.aspx

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I guess this is Ok. But it'd be better using javascript.
    Jeremy | jfein.net

  3. #3
    Join Date
    Dec 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking Alternative simple code

    I usually use this code, it works on every browser and has no preload problems, plus it's really simple:

    Code:
    <style>
    img.nohover {border:0}
    img.hover {border:0;display:none}
    A:hover img.hover {display:inline}
    A:hover img.nohover {display:none}
    </style>
    
    <A HREF="#">
    <img src="b1.gif" class="nohover">
    <img src="b2.gif" class="hover">
    </A>

  4. #4
    Join Date
    Feb 2007
    Posts
    46
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    I tried the above, and it works in every browser EXCEPT I.E.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •