<html> <head> <title>ololo</title> <style> html,body{ margin: 0; padding: 0; height: 100%; width: 100%; } #freezed{ text-align: center; border: 5px solid #ccc; border-radius: 80px; box-shadow: inset 0 0 30px rgba(66,66,66,0.5); } .loading{ color: #999; font-weight: bold; font-size: large; margin-top: 5px; margin-left: 5px; } </style> <script type="text/javascript"> window.onload = function(){ var div = document.getElementById("freezed"); div.style.width = getDocWidth() - 10; div.style.height = getDocHeight()/2 - 10; div.style.paddingTop = getDocHeight()/2 function getDocHeight() { var D = document; return Math.max( Math.max(D.body.scrollHeight, D.documentElement.scrollHeight), Math.max(D.body.offsetHeight, D.documentElement.offsetHeight), Math.max(D.body.clientHeight, D.documentElement.clientHeight) ); } function getDocWidth() { var D = document; return Math.max( Math.max(D.body.scrollWidth, D.documentElement.scrollWidth), Math.max(D.body.offsetWidth, D.documentElement.offsetWidth), Math.max(D.body.clientWidth, D.documentElement.clientWidth) ); } } </script> </head> <body> <div id="freezed"><img src="img/loading.gif"/><div class="loading">Loading ...</div></div> </body> </html>