Indexhibit Fullscreen Css Background


/ Published in: PHP
Save to your folder(s)

Use this code to call the Plugin:


Copy this code and paste it in your HTML
  1. <?PHP
  2.  
  3. /*==================================================*/
  4. /*======= Indexhibit full background image =========*/
  5. /*======= Plugin version 1.0 =========*/
  6. /*==================================================*/
  7.  
  8. /* @author Steffen Görg aka G470 http://gatonet.de */
  9.  
  10. /*===================== USAGE ======================*/
  11. /*==================================================*/
  12. /*== Upload your background image to your server,
  13. /*== add the plugin code with your image url to
  14. /*== your exhibit
  15. /*== <plug:full_background_image 'http://yourdomain.com/yourimage.jpeg' />
  16. /*==================================================*/
  17.  
  18.  
  19.  
  20. function full_background_image($url=false){
  21. $bgscript = "<script type=\"text/javascript\">$(function(){
  22. $('body').append(\"<div id='bg' style='position: fixed;top: 0;left: 0;z-index: -1;width: 100%;height: 100%;overflow: hidden;'><div id='img' style='position: relative;width: 200%;height: 200%;top: -50%;left: -50%;overflow: hidden;'><img src='".$url."' alt='' style='display: inline-block;position: relative;min-width: 75% !important;min-height: 75% !important; max-width:inherit !important;' /></div></div>\"); });</script> ";
  23. return $bgscript;
  24. };
  25. ?>

URL: http://gatonet.de

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.