css3+html5实现用户界面加载效果
源码
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style>
@font-face {
font-family: "font_wrl";
src: url(img/rtrxnfht.TTF);
}
@keyframes myprogress {
0% {
opacity: 0.2;
border-color: yellowgreen;
background: yellowgreen;
width: 0%;
}
60% {
opacity: 0.6;
border-color: yellowgreen;
background: yellowgreen;
width: 60%;
}
100% {
opacity: 1.0;
border-color: yellowgreen;
background: yellowgreen;
width: 100%;
}
}
@keyframes myTransform {
0% {
transform: scaleY(1);
}
20% {
transform: scaleY(2);
}
21% {
transform: scaleY(1);
}
100% {
transform: scaleY(1);
}
}
* {
margin: 0;
padding: 0;
}
#divMain {
position: fixed;
background: rgba(0, 0, 0, .45);
width: 100%;
height: 100%;
}
ul {
width: auto;
position: fixed;
top: 50%;
left: 50%;
margin-left: -22px;
}
ul>li {
list-style: none;
margin: auto 2px;
float: left;
height: 20px;
width: 5px;
background: yellowgreen;
transform-origin: 50% 70%;
}
li:nth-child(1) {
animation: myTransform 1.5s ease-in-out 0s infinite backwards;
}
li:nth-child(2) {
animation: myTransform 1.5s ease-in-out .2s infinite backwards;
}
li:nth-child(3) {
animation: myTransform 1.5s ease-in-out .4s infinite backwards;
}
li:nth-child(4) {
animation: myTransform 1.5s ease-in-out .6s infinite backwards;
}
li:nth-child(5) {
animation: myTransform 1.5s ease-in-out .8s infinite backwards;
}
.loadtext {
width: 150px;
color: yellowgreen;
position: fixed;
left: 50%;
margin-left: -60px;
top: 50%;
margin-top: 30px;
text-align: center;
font-family: "font_wrl";
letter-spacing: 2px;
}
#myprogress {
height: 20px;
border: 1px solid yellowgreen;
position: fixed;
bottom: 50px;
border-radius: 5px;
background: #9ACD32;
animation: myprogress 5s linear infinite;
}
#myprogressborder {
height: 20px;
width: 100%;
border: 1px solid yellowgreen;
position: fixed;
bottom: 50px;
border-radius: 20px;
line-height: 20px;
color: #fff;
font-family: "font_wrl";
text-align: center;
box-shadow: 0 0 0.5em #fff;
}
</style>
</head>
<body>
<div style="background: url(https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1600749017341&di=af5b9b0e1f839dcdb98836c711dded87&imgtype=0&src=http%3A%2F%2Fyouimg1.c-ctrip.com%2Ftarget%2Ftg%2F457%2F111%2F427%2F5b4fcb385d7d4bbdb96938e8090503b4.jpg) no-repeat; background-size: cover;height: 100%; width: 100%;display: block;position: absolute;"></div>
<div id="divMain">
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
<span class="loadtext">用户界面加载中...</span>
<div id="myprogress">
</div>
<div id="myprogressborder">
当前进度:100%
</div>
</div>
</body>
</html>
本文来自博客园,作者:JackieDYH,转载请注明原文链接:https://www.cnblogs.com/JackieDYH/p/17634502.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· SQL Server 2025 AI相关能力初探
· AI编程工具终极对决:字节Trae VS Cursor,谁才是开发者新宠?
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南