Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS What is the best way to change an image background on hover in CSS?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46550
    drewwyatt
    Participant

    I have used a handful of methods to accomplish this in the past. Basically – I am looking for the “accepted” way of creating an image hover effect (in this specific scenario, I want to change the color of some social icons).

    The 2 best methods I have used so far was preloading the second (hover) image and then replacing the first image.

    **OR**

    Stacking the images into one single image. and using background-position to move the second image into the visible area.

    Is one of these better than the other? Or is there something I haven’t named that is better than these?

    #143622
    chrisburton
    Participant

    Icon fonts.

    #143623
    Alen
    Participant
    #143624
    chrisburton
    Participant

    Just to add: I prefer icons from http://thenounproject.com and then import them into http://icomoon.io.

    However, I like to design my own.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.