这有点难以解释,所以我会尽我所能
因此,当HTML页面加载时,我希望有一个很酷的加载屏幕.完成加载后,我希望清除加载屏幕并显示HTML文档.
基本上,我想要这个:
CSS:
/* Absolute Center CSS Spinner */
.loading {
position: fixed;
z-index: 999;
height: 2em;
width: 2em;
overflow: show;
margin: auto;
top: 0;
left: 0;
bottom: 0;
right: 0;
}
/* Transparent Overlay */
.loading:before {
content: '';
display: block;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.3);
}
/* :not(:required) hides these rules from IE9 and below */
.loading:not(:required) {
/* hide "loading..." text */
font: 0/0 a;
color: transparent;
text-shadow: none; …Run Code Online (Sandbox Code Playgroud)