Image Rollovers or CSS a:hover ?

Discussion in 'HTML' started by RS, Jan 18, 2008.

  1. RS

    RS Guest

    Hi,
    Which method will load faster, and repond better on the client -

    onMouseOver="changeImages()"

    Or

    a:hover{
    background-image:url(images/BG.gif);
    }

    Or

    a:hover{
    background-color: black; /*change the background color on rollover*/

    Thanks in advance.


    }
    RS, Jan 18, 2008
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed RS <> writing
    in news::

    > Hi,
    > Which method will load faster, and repond better on the client -
    >
    > onMouseOver="changeImages()"


    Does not work for users without javascript.

    >
    > Or
    >
    > a:hover{
    > background-image:url(images/BG.gif);
    > }
    >


    Works for those without js, and depends on the size of the image as far
    as speed goes.

    > Or
    >
    > a:hover{
    > background-color: black; /*change the background color on rollover*/
    >


    Is always going to be faster than an image on the client.

    > Thanks in advance.
    >


    You're welcome.


    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Jan 18, 2008
    #2
    1. Advertising

  3. RS

    Neredbojias Guest

    Well bust mah britches and call me cheeky, on Fri, 18 Jan 2008 14:28:28 GMT
    RS scribed:

    > Hi,
    > Which method will load faster, and repond better on the client -
    >
    > onMouseOver="changeImages()"
    >
    > Or
    >
    > a:hover{
    > background-image:url(images/BG.gif);
    > }
    >
    > Or
    >
    > a:hover{
    > background-color: black; /*change the background color on rollover*/


    As the frugal gourment implied, the prize goes to (3). That's also the one
    (uh, meaning "3") which should typically be used most of the time.

    --
    Neredbojias
    Riches are their own reward.
    Neredbojias, Jan 18, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. altamir

    Nice CSS rollovers: IE hack

    altamir, Nov 17, 2003, in forum: HTML
    Replies:
    1
    Views:
    480
    e n | c k m a
    Nov 17, 2003
  2. Steve Gouldstone

    CSS hover style affects image hotspots

    Steve Gouldstone, Feb 6, 2006, in forum: HTML
    Replies:
    5
    Views:
    10,109
  3. dreamee

    CSS hover image link not working in IE

    dreamee, Oct 1, 2011, in forum: HTML and CSS
    Replies:
    0
    Views:
    1,522
    dreamee
    Oct 1, 2011
  4. Dinsdale
    Replies:
    5
    Views:
    153
    Dinsdale
    Jan 19, 2007
  5. akela_p501usa

    :hover rollovers with images would work in IE,

    akela_p501usa, Dec 4, 2007, in forum: Javascript
    Replies:
    2
    Views:
    105
Loading...

Share This Page