Forums

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

Home Forums CSS How do i replicate this hover effect ?

  • This topic is empty.
Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #41771
    Kaladan
    Member

    This page here: > http://themejug.com/demo/galao/ has a simple yet elegant hover effect on images, and i can’t replicate it. I tried looking at the source code but it was an exercise in futility. Can any of you, css ninjas, help me ?

    #119909
    chrisburton
    Participant

    I inspected the hover and this is what it came up with: http://cloud.chrisburton.me/LxcN

    #119921
    dfogge
    Participant

    they’re not doing it with pure CSS.

    they’re using a jQuery plugin called Mosaic.
    http://buildinternet.com/project/mosaic/

    A quick google lead me to a post by Jonathan Snook showing how to overlay hidden content on hover without javascript: http://snook.ca/archives/html_and_css/content_overlay_css

    #119923
    chrisburton
    Participant

    I would go with a CSS solution.

    #119924
    dfogge
    Participant

    agreed @chrisburton, unless you’re unfortunate enough to require ie6 support.

    #119925
    chrisburton
    Participant
    #119931
    dfogge
    Participant

    just forked to add in the opacity and fade effects: http://codepen.io/derekfogge/pen/ChGkj

    please note i toggled on Prefix Free.

    #119939
    chrisburton
    Participant

    Thanks @dfogge. I couldn’t figure out the transition effect.

    #119982
    Kaladan
    Member

    wow amazing. thank you guys, you really know your stuff. i sincerely hope that in the near future i will be good enough at this to help other people like you do.

    #119988
    bogus
    Participant

    I forked chris script again, because this is touching a problem that i too am facing atm.

    [Codepen](http://codepen.io/anon/pen/dzoDB “”)

    I assumed that a thumbnail image should be clickable (like it is in the original link Kaladan posted). With the CSS trick it is only clickable, where there’s no white overlay. how to fix that?

    #119989
    chrisburton
    Participant

    @bogus Can you explain further in detail on what you’re asking?

    #119993
    bogus
    Participant

    sure, chris!

    the link Kaladan posted (themejug galao theme) shows thumbnails with rollovers you can click on to show the post.
    The CSS solution you posted in this thread resembles the rollover effect perfectly except for the fact that the thumbnail cannot be clicked anymore although the image is in a tags (see my fork of your script).

    only the outer area that is not covered by the rollover can be clicked. I’d like to know how make the whole thing clickable like it’s in the galao theme. Preferably without JS.

    #119994
    chrisburton
    Participant
    #119995
    dfogge
    Participant

    hey bogus, you just need to wrap the whole thing in an anchor tag.

    like so:
    http://codepen.io/derekfogge/pen/ChGkj

    #119996
    dfogge
    Participant
Viewing 15 posts - 1 through 15 (of 22 total)
  • The topic ‘How do i replicate this hover effect ?’ is closed to new replies.