Difference between revisions of "Template:IISER Pune 2"

Line 4: Line 4:
  
 
<!-- Declare that you are going to use html code instead of wiki code -->
 
<!-- Declare that you are going to use html code instead of wiki code -->
<html>
+
<html class="loading">
 +
<head>
 +
<meta charset="utf-8">
 +
<title>Loading Example</title>
 +
<style>
 +
html {
 +
-webkit-transition: background-color 1s;
 +
transition: background-color 1s;
 +
}
 +
html, body { min-height: 100%; }
 +
html.loading {
 +
background: #333 url('https://static.igem.org/mediawiki/2015/e/e5/IISER_PUNE_TITLE.gif') no-repeat 50% 50%;
 +
-webkit-transition: background-color 0;
 +
transition: background-color 0;
 +
}
 +
body {
 +
-webkit-transition: opacity 1s ease-in;
 +
transition: opacity 1s ease-in;
 +
}
 +
html.loading body {
 +
opacity: 0;
 +
-webkit-transition: opacity 0;
 +
transition: opacity 0;
 +
}
 +
button {
 +
background: #00A3FF;
 +
color: white;
 +
padding: 0.2em 0.5em;
 +
font-size: 1.5em;
 +
}
 +
</style>
 +
<script>
 +
var html = document.getElementsByTagName('html')[0];
 +
var removeLoading = function() {
 +
// In a production application you would remove the loading class when your
 +
// application is initialized and ready to go.  Here we just artificially wait
 +
// 3 seconds before removing the class.
 +
setTimeout(function() {
 +
html.className = html.className.replace(/loading/, '');
 +
}, 3000);
 +
};
 +
removeLoading();
 +
</script>
 +
</head>
 +
 
 +
 
  
 
<link rel="stylesheet" type="text/css"  
 
<link rel="stylesheet" type="text/css"  

Revision as of 17:02, 17 September 2015


Loading Example