当前位置:网站首页>Add transition layer to JS page
Add transition layer to JS page
2022-07-25 05:11:00 【flymore96】
You can directly use the following code ,gif The motion chart needs to be found by yourself , You can use this website to generate dynamic graphs https://www.intogif.com/loading/
<!-- Basic style -->
<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>
<!-- Transition layer --start -->
<div id="loading">
<div class="item">
<img class="loading" src="/resources/ges/images/loading-2.gif" alt="">
<p> Page loading ...</p>
</div>
</div>
<!-- Transition layer --end -->
<script>
// Page load transition layer .
(function init(){
document.onreadystatechange = ()=>{
if(document.readyState == "complete")
document.querySelector('#loading').className = "loadingNone";
}
})()
</script>
边栏推荐
- STL notes (VI): container vector
- Redis集群搭建(Windows)
- Add click event to unity 3D object
- Ownership in rust -- introduction of rust language Xiaobai 11
- STL notes (VIII): container - List
- Use getifaddrs to obtain the IP address of the local network interface
- 956. Highest billboard pressure DP
- Docker builds MySQL master-slave replication
- STM32 Development Notes 118: using CMSIS DSP Library in stm32cube IDE
- 300. Longest increasing subsequence
猜你喜欢

Basic knowledge of scratch crawler framework

Panda3D keyboard moving scene

After watching the latest interview with big manufacturers, these six JVM interview questions were asked

Teach you how to locate unreasonable SQL? And optimize it

2022-7-18 summary

Three must know and know problems of redis

HMS Core Discovery第16期直播预告|与虎墩一起,玩转AI新“声”态

Leetcode55. Jumping game

Pikachu vulnerability platform exercise

Redis cluster setup (Windows)
随机推荐
HMS Core Discovery第16期直播预告|与虎墩一起,玩转AI新“声”态
The second day of rhcsa summer vacation
Unity LOD
Style transfer -- CCPL: contrast coherence preserving loss for versatile style transfer
85 distributed project construction
Anaconda installs jupyter
1310_一个printf的实现分析
Web: compiling big refactoring from 10 to 1
2022-7-15 summary
Panda3D keyboard moving scene
Execution process of NPM run XX
【微信小程序】拍卖商品详情页设计与交互实现(包含倒计时、实时更新出价)
2022-7-13 summary
自己实现is_base_of
Small case of data analysis: visualize recruitment data and view the most needed technologies in the field~
Logu p3398 hamsters find sugar solution
RHCE first day
38 lines of PHP code free import database analysis Linux access log
Data Lake (16): structured streaming writes iceberg in real time
rhce第一天