Fade in when the page has loaded
This commit is contained in:
parent
964ac4bd2c
commit
ae6e9a00d4
3 changed files with 13 additions and 1 deletions
|
@ -6,6 +6,13 @@
|
||||||
<title>@ViewData["Title"] | Robware</title>
|
<title>@ViewData["Title"] | Robware</title>
|
||||||
<link href="/css/style.css" rel="stylesheet" defer/>
|
<link href="/css/style.css" rel="stylesheet" defer/>
|
||||||
<script type="text/javascript" src="/js/javascript.min.js"></script>
|
<script type="text/javascript" src="/js/javascript.min.js"></script>
|
||||||
|
<noscript>
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</noscript>
|
||||||
<link rel="icon" type="image/png" href="/images/logo.png"/>
|
<link rel="icon" type="image/png" href="/images/logo.png"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -14,6 +14,7 @@ html {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: url(/images/background.png);
|
background: url(/images/background.png);
|
||||||
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
html,
|
html,
|
||||||
|
|
|
@ -64,4 +64,8 @@ function documentReady(callback) {
|
||||||
setTimeout(callback, 1);
|
setTimeout(callback, 1);
|
||||||
else
|
else
|
||||||
document.addEventListener("DOMContentLoaded", callback);
|
document.addEventListener("DOMContentLoaded", callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.onload = () => {
|
||||||
|
document.querySelector("html").style.opacity = 1;
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue