小编unk*_*wnA的帖子

页面加载时的JavaScript加载屏幕

这有点难以解释,所以我会尽我所能

因此,当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)

html javascript css jquery loading

45
推荐指数
2
解决办法
18万
查看次数

标签 统计

css ×1

html ×1

javascript ×1

jquery ×1

loading ×1