Full Screen scaling Background Centered Image w/- jQuery
-
So you want to have a background image on your website, which always fills the screen and maintains its aspect ratio? And it has to be centered, instead of focussing at the top left corner of the image?So how do you do that?
It is possible with jQuery and the fullscreenr plugin on this page! You can find a demonstration here and as you can see it works perfectly in all javascript enabled browsers. Note that Internet Explorer needs some extra code to enable the transparent png used for the raster over the background image. If you want to add this code I would like to refer you to unitpngfix, but of course you could just not support IE6.
The code is quite self explanatory, and I’ve included comments where necessary.
Author: NanoTux
Download: RepositoryRelated Posts:
- Day and Night – Creating a Scenery Animation with jQuery and CSS
- jQuery fancy Draggable Captcha
- Rounded Menu with CSS3 and jQuery
- timeAGO a jQuery plugin
- GoogleMap Markers jQuery from HTML list !
GD Star Rating
loading…








One Response and Counting...
Read Full Screen scaling Background Centered Image w/- jQuery now at http://bit.ly/9eHTHS
Reply
loading...