web建站教程
  1. 首页
  2. vuejs
  3. js
  4. 好玩
  5. AIGC工具
  6. 前端知识
  7. 百度echarts
  8. 更多
    php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站
    手机应用

网站加载中loading..样式三代码介绍

652 ℃

css代码:

body {
  background:#1b1d1f;
  display:flex;
  justify-content:center;
  align-items:center;
  height:100vh;
  padding:0;
  margin:0
}
.loader {
  width:130px;
  height:170px;
  position:relative
}
.loader::before,.loader::after {
  content:"";
  width:0;
  height:0;
  position:absolute;
  bottom:30px;
  left:15px;
  z-index:1;
  border-left:50px solid transparent;
  border-right:50px solid transparent;
  border-bottom:20px solid rgba(107,122,131,.15);
  transform:scale(0);
  transition:all 0.2s ease
}
.loader::after {
  border-right:15px solid transparent;
  border-bottom:20px solid rgba(102,114,121,.2)
}
.loader .getting-there {
  width:120%;
  text-align:center;
  position:absolute;
  bottom:0;
  left:-7%;
  font-family:"Lato";
  font-size:12px;
  letter-spacing:2px;
  color:#555
}
.loader .binary {
  width:100%;
  height:140px;
  display:block;
  color:#555;
  position:absolute;
  top:0;
  left:15px;
  z-index:2;
  overflow:hidden
}
.loader .binary::before,.loader .binary::after {
  font-family:"Lato";
  font-size:24px;
  position:absolute;
  top:0;
  left:0;
  opacity:0
}
.loader .binary:nth-child(1)::before {
  content:"0";
  -webkit-animation:a 1.1s linear infinite;
  animation:a 1.1s linear infinite
}
.loader .binary:nth-child(1)::after {
  content:"0";
  -webkit-animation:b 1.3s linear infinite;
  animation:b 1.3s linear infinite
}
.loader .binary:nth-child(2)::before {
  content:"1";
  -webkit-animation:c 0.9s linear infinite;
  animation:c 0.9s linear infinite
}
.loader .binary:nth-child(2)::after {
  content:"1";
  -webkit-animation:d 0.7s linear infinite;
  animation:d 0.7s linear infinite
}
.loader.JS_on::before,.loader.JS_on::after {
  transform:scale(1)
}
@-webkit-keyframes a {
  0% {
  transform:translate(30px,0) rotate(30deg);
  opacity:0
}
100% {
  transform:translate(30px,150px) rotate(-50deg);
  opacity:1
}
}@keyframes a {
  0% {
  transform:translate(30px,0) rotate(30deg);
  opacity:0
}
100% {
  transform:translate(30px,150px) rotate(-50deg);
  opacity:1
}
}@-webkit-keyframes b {
  0% {
  transform:translate(50px,0) rotate(-40deg);
  opacity:0
}
100% {
  transform:translate(40px,150px) rotate(80deg);
  opacity:1
}
}@keyframes b {
  0% {
  transform:translate(50px,0) rotate(-40deg);
  opacity:0
}
100% {
  transform:translate(40px,150px) rotate(80deg);
  opacity:1
}
}@-webkit-keyframes c {
  0% {
  transform:translate(70px,0) rotate(10deg);
  opacity:0
}
100% {
  transform:translate(60px,150px) rotate(70deg);
  opacity:1
}
}@keyframes c {
  0% {
  transform:translate(70px,0) rotate(10deg);
  opacity:0
}
100% {
  transform:translate(60px,150px) rotate(70deg);
  opacity:1
}
}@-webkit-keyframes d {
  0% {
  transform:translate(30px,0) rotate(-50deg);
  opacity:0
}
100% {
  transform:translate(45px,150px) rotate(30deg);
  opacity:1
}
}@keyframes d {
  0% {
  transform:translate(30px,0) rotate(-50deg);
  opacity:0
}
100% {
  transform:translate(45px,150px) rotate(30deg);
  opacity:1
}
}
.io-black-mode .loader .getting-there,.io-black-mode .loader .binary {
  color:#bbb
}

html代码:

<div id="loading">
  <div class="loader JS_on">
  <span class="binary"></span>
  <span class="binary"></span>
  <span class="getting-there">LOADING STUFF...</span>
  </div>
</div> 

点击查看效果

网站加载中loading..样式五代码介绍

网站加载中loading..样式四代码介绍

网站加载中loading..样式二代码介绍

网站加载中样式loading..代码介绍

如何利用svg做一个有趣的loading动画加载

标签: css网站加载, loading

上面是“网站加载中loading..样式三代码介绍”的全面内容,想了解更多关于 前端知识 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_13320.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > 前端知识
本文共计2742个字,预计阅读时长19分钟
Trae:新一代免费的AI编程工具

基金从业资格考试题库

一站式备考基金从业资格考试,收录2021-2025年模拟题库!呱呱工具箱

AI工作站

收录全球3800+ 款各行各业AI应用,轻轻松松做事!
生活小工具,收录了80多款小工具
上一篇: 程序员正能量文案:乐观积极的治愈系文案,朋友圈满满向上动力句子
下一篇: Lunar组件如何利用I18n实现多语言功能
x 打工人ai神器