console
window.onload= function() {
Particles.init({
selector: '.background',
color: '#ffffff',
maxParticles: 80,
minDistance: 100,
connectParticles: true,
});
const dot = document.getElementById('update-info-dot');
let tickClock = 0;
setInterval(() => {
dot.innerHTML += '.'
tickClock++
if (tickClock > 3) {
tickClock = 0;
dot.innerHTML = ''
}
}, 800)
};
<div class="update-warpper">
<div class="logo"></div>
<canvas class="background" width="841" height="848" style="width: 100%; height: 100%;"></canvas>
<div class="update-info-wrapper">
<div class="update-info-main-text">
网站正在升级中
<span id="update-info-dot"></span>
</div>
<div class="update-info-text">
更多功能即将呈现
</div>
</div>
<div class="more-btn">
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/particlesjs/2.2.2/particles.min.js"></script>
html,
body {
width: 100%;
height: 100%;
}
html,
body,
p,
ul,
li {
margin: 0;
border: 0;
padding: 0;
}
.logo {
position: absolute;
top: 0px;
right: 10px;
background: url(https://quntuicdn.liankaa.com/corporation/img/liankaa_crm_logo.448a4b7.png) center no-repeat;
width: 100px;
height: 64px;
background-size: contain;
}
.background {
position: absolute;
display: block;
top: 0;
left: 0;
z-index: 0;
}
.update-warpper {
width: 100%;
height: 100%;
text-align: center;
padding-top: 150px;
box-sizing: border-box;
color: #ffffff;
font-family: "SF Pro SC","SF Pro Text","SF Pro Icons","PingFang SC","Helvetica Neue","Helvetica","Arial",sans-serif;
background: rgb(10,2,143);
background: linear-gradient(53deg, rgba(10,2,143,1) 0%, rgba(67,67,171,1) 40%, rgba(82,82,207,1) 59%, rgba(0,212,255,1) 100%);
}
.update-info-main-text {
font-size: 64px;
margin-bottom: 50px;
position: relative;
}
#update-info-dot {
position: absolute;
bottom: -10px;
margin-left: 10px;
}
.update-info-text {
font-size: 32px;
}
.more-btn {
margin: 0 auto;
width: 50px;
height: 5px;
border-radius: 50px;
background-color: #ffffff;
position: absolute;
bottom: 20px;
left: 50%;
margin-left: -25px;
opacity: 1;
animation: twinkle 3s infinite alternate;
}