Page 1 of 1

[Ask]Image Effect

Posted: Sun Jul 19, 2009 9:11 am
by nitediver
Anyone know, what does it call and how to do this effect?
Is this using javascript?
Image

Re: [Ask]Image Effect

Posted: Sun Jul 19, 2009 9:35 am
by kaszu
There are several ways of achieving it:
1) Using javascript: it's called lightbox, but usually lightbox creates a mask over the page.
2) Using CSS: disadvantage comparing to lightbox is no animation and no image preloading

Code: Select all

<a href="#" class="image">
    <img src="..." alt="" class="small" />
    <img src="..." alt="" class="large" />
</a>

Code: Select all

a.image .large {
    position: absolute;
    margin: 50px 0 0 150px;
    display: none;
}
a.image:hover .large {
    display: block;
}

Re: [Ask]Image Effect

Posted: Mon Jul 20, 2009 8:29 am
by nitediver
I already use lightbox, but I just dont like it...

Thanks for the css...