Home | Logo Design | Examples | Networking | Articles | Contact Us
There are some great effects for websites that can be done with CSS. Today, I would like to talk about image pop-ups, this can be defined as scrolling over an image and having it enlarge. This is a very useful effect when working with images and trying to keep the initial size of those images small enough to look presentable. Click here for an example.
First you will have to declare it in your CSS, copy the following code into popup.css, or jsut copy mine here.
To sum this up, you are going to have a thumbnail and your large image when you load your page. Your large image however will only load a 1 pixel x 1 pixel, and upon a mouseover if will "jump" left 150 pixels and down 60 pixels. Now, you have to declare this in your html otherwise you will display both images at the declared sizes. In your HTML add this code:
The first 'img' tag calls the thumbnail and sets the size. The second 'img' tag sets the size for the mouseover version. The first 'alt' tag sets the alternate text for the thumb and the second 'alt' tag is for the larger image. If you want a full working example that you can get the source HTML code from click here. In our next article we will be using creating a lightbox effect with CSS.