当前位置:网站首页>js 页面增加过渡层
js 页面增加过渡层
2022-07-25 05:10:00 【flymore96】
可直接使用下面代码,gif动图需要自己查找,可以使用此网站生成动图https://www.intogif.com/loading/
<!-- 基础样式 -->
<style>
#loading {
position: fixed;
width: 100%;
height: 100%;
background: #ffffff;
z-index: 1;
top: 0px;
left: 0px;
color: #000000;
}
#loading .item {
text-align: center;
width: 300px;
height: 100px;
margin: auto;
position: absolute;
top: 0px;
bottom: 0px;
left: 0px;
right: 0px;
}
.loadingNone {
display: none;
}
#loadingContainer .loading{
width: 12%;
margin-bottom: 12px;
}
</style>
<!-- 过渡层 --start -->
<div id="loading">
<div class="item">
<img class="loading" src="/resources/ges/images/loading-2.gif" alt="">
<p>页面加载中...</p>
</div>
</div>
<!-- 过渡层 --end -->
<script>
// 页面加载过度层。
(function init(){
document.onreadystatechange = ()=>{
if(document.readyState == "complete")
document.querySelector('#loading').className = "loadingNone";
}
})()
</script>
边栏推荐
- 教你如何定位不合理的SQL?并优化之
- Ownership in rust -- introduction of rust language Xiaobai 11
- Novel capture practice
- ESWC 2018 | r-gcn: relational data modeling based on graph convolution network
- Bypass XSS filters in Web Applications
- [sht30 temperature and humidity display based on STM32F103]
- Pyg builds GCN to realize link prediction
- Androd releases jitpack open source project (gradle7.2)
- Introduction to FileStream class of C #
- 2022-07-24: what is the output of the following go language code? A:[]int{}; B:[]int(nil); C:panic; D: Compilation error. package main import ( “fmt“ ) f
猜你喜欢
![2022-07-24:以下go语言代码输出什么?A:[]int{};B:[]int(nil);C:panic;D:编译错误。 package main import ( “fmt“ ) f](/img/bf/e38a8fd813f88a83f61a1abfa3b95d.png)
2022-07-24:以下go语言代码输出什么?A:[]int{};B:[]int(nil);C:panic;D:编译错误。 package main import ( “fmt“ ) f
![[analysis of GPIO register (crl/crh) configuration of STM32]](/img/63/a7b262e95f1dc74201ace9d411b46f.png)
[analysis of GPIO register (crl/crh) configuration of STM32]

Implementation of recommendation system collaborative filtering in spark

RHCE first day

MCU experiment record

Event cycle mechanism browser nodejs async await execution sequence promise execution sequence interview questions

Unity LOD

深圳随到随考,科目四随到随考,科三理论第二理论随到随考说明

ESWC 2018 | r-gcn: relational data modeling based on graph convolution network

2022-7-18 summary
随机推荐
深圳随到随考,科目四随到随考,科三理论第二理论随到随考说明
ESWC 2018 | r-gcn: relational data modeling based on graph convolution network
[the most comprehensive and detailed] how to design a database and table splitting scheme that can dynamically expand and shrink capacity?
搭建私有CA服务器
Getting started with scratch
Performance Optimization: how to solve the slow loading speed of the first screen of spa single page application?
Luogu p4281 [ahoi2008] emergency gathering / gathering solution
Performance Optimization: lazy loading of pictures
Openworm project compilation
Go language function
Idea2021 installation
[literature notes] pointmlp
基于云原生的私有化 PaaS 平台交付实践
Why does the official not recommend using UUID as MySQL primary key
基环树入门
[no title] 1
deep报错
Logu p3398 hamsters find sugar solution
JS common code questions array de duplication - Custom New throttling and anti shake - deep copy - instanceof URL parameter extraction - thousand separator - array to tree structure - array flattening
Redis集群搭建(Windows)