Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <img src="yourimage" width="100%" height="100%" style="z-index:0"/>
- <div style="width:100%; z-index:0; height:100%; background: url(1pximage.gif)"></div>
- body {
- background-size: 100%;
- }
- $(function(){
- $(window).resize(function(){
- var windowW = $(window).width();
- var windowH = $(window).height();
- //Using above variables you can deside the size of the background image to be set
- }).resize();//Trigger the resize event on page load.
- });
Add Comment
Please, Sign In to add comment