简体   繁体   中英

Full screen background image only full screen when browser window is resized

The background image for this only "pops" into place as a full screen image after the browser window is resized. This seems to happen only in firefox and opera but is ok in safari. Not tested in IE yet. How can I make it instantly full screen when the page loads instead? Note when displayDiv div is removed it works fine. Thanks

Code: http://jsfiddle.net/UggMq/

Just trigger the resize event when the page loads:

$(window).trigger("resize");

Fixed fiddle: http://jsfiddle.net/UggMq/1/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM