首页 > 其他分享 >CSS~等待效果实现

CSS~等待效果实现

时间:2023-10-09 12:06:47浏览次数:28  
标签:效果 transform height delay animation dot webkit 等待 CSS

<style>
    .first-loading-wrp {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
      min-height: 420px;
      height: 100%;
      margin-top: 150px;
    }

    .first-loading-wrp .loading-wrp {
      padding: 98px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .dot {
      animation: antRotate 1.2s infinite linear;
      transform: rotate(45deg);
      position: relative;
      display: inline-block;
      font-size: 32px;
      width: 32px;
      height: 32px;
      box-sizing: border-box;
    }

    .dot i {
      width: 14px;
      height: 14px;
      position: absolute;
      display: block;
      background-color: #1890ff;
      border-radius: 100%;
      transform: scale(0.75);
      transform-origin: 50% 50%;
      opacity: 0.3;
      animation: antSpinMove 1s infinite linear alternate;
    }

    .dot i:nth-child(1) {
      top: 0;
      left: 0;
    }

    .dot i:nth-child(2) {
      top: 0;
      right: 0;
      -webkit-animation-delay: 0.4s;
      animation-delay: 0.4s;
    }

    .dot i:nth-child(3) {
      right: 0;
      bottom: 0;
      -webkit-animation-delay: 0.8s;
      animation-delay: 0.8s;
    }

    .dot i:nth-child(4) {
      bottom: 0;
      left: 0;
      -webkit-animation-delay: 1.2s;
      animation-delay: 1.2s;
    }

    @keyframes antRotate {
      to {
        -webkit-transform: rotate(405deg);
        transform: rotate(405deg);
      }
    }

    @-webkit-keyframes antRotate {
      to {
        -webkit-transform: rotate(405deg);
        transform: rotate(405deg);
      }
    }

    @keyframes antSpinMove {
      to {
        opacity: 1;
      }
    }

    @-webkit-keyframes antSpinMove {
      to {
        opacity: 1;
      }
    }

    #app {
      height: 100%;
    }
  </style>
<div class="first-loading-wrp">     
      <div class="loading-wrp">
        <span class="dot dot-spin"><i></i><i></i><i></i><i></i></span>
      </div>    
    </div>

标签:效果,transform,height,delay,animation,dot,webkit,等待,CSS
From: https://blog.51cto.com/dd118/7771948

相关文章

  • scss基础
    官网https://www.sass.hk/guide/变量导入SASS文件静默注释混合器选择器继承style选项if指令for循环each循环while条件function函数文件后缀sass有两种后缀名文件:后缀名为sass,不使用大括号和分号后缀名为scss,这种和我们平时写的css文件格式......
  • CSS常用总结
    重置样式html,body,ul,li,a,p,div{padding:0;margin:0;//设置盒模型box-sizing:border-box;//移除移动端特有的点击高亮效果-webkit-tap-highlight-color:transparent;}body{font-family:"PingFangSC","MicrosoftYaHei","Helve......
  • CSS单位
    CSS常用长度单位px:相对长度单位相对于显示器屏幕分辨率rem:相对长度单位对于根元素(即html元素)font-size计算值的倍数html{font-size:14px;那么14px=1rem28px=2rem即:npx=n/14rem}h3{font-size=2rem;//转换为px即是2*12=24px}vw和vh移动端......
  • Vue学习笔记(七):绑定css样式
      1绑定class样式¶vue为HTML绑定css中的class样式是通过v-bind实现的。  1.1绑定单个class¶把需要绑定的样式class名赋值给一遍变量,然后通过变量v-bind绑定class属性,绑定后的class并不会覆盖原来的class属性,而是与原来的class进行叠加。如下所示,d......
  • 使用postcss-px-to-viewport实现兼容
    为提高页面的兼容性,可使用postcss-px-to-viewport。1.安装依赖"postcss-px-to-viewport":"^1.1.1"2.在vite.config.js导入importpostcssPxToViewportfrom'postcss-px-to-viewport';3.增加css配置,示例如下returndefineConfig({plugins:[vue(),buildTi......
  • css - 脱离文档流
    CSSposition定位&z-index层级1.定位position:(1).相对定位relative:元素相对定位:a.相对于元素在文档流中原本的位置定位的b.不脱离文档流c.如果不设置偏移量,元素不会发生任何变化不改变元素性质(块级/内联元素)(2).绝对定位absolute:绝对定位的元素:a.相对于最近开启......
  • css
     目录1.介绍css2.CSS语法3.CSS注释4.CSS中的颜色值5.CSS长度单位6.html引入CSS的三种方法  6.1行内样式(内联样式)  6.2 内嵌样式  6.3外部样式7.选择器  7.1标签选择器  7.2类选择器  7.3ID选择器  7.4通配所有元素......
  • css字体样式
     1.font-style设置字体样式属性值:  normal:指定⽂本字体样式为正常的字体  italic:指定⽂本字体样式为斜体。2.文字字体font-family只能引用系统自带的字体样式,如果需要其他别的字体,需要从外部下载调用引用外部字体  网站:https://font.chinaz.com/katongziti.......
  • 在 Less 中使用与 Less 内置函数同名的原生 CSS 函数
    参考资料calc()-CSS:层叠样式表|MDNGettingstarted-Escaping|Less.jsUsingTheCSSFunctioncalc()InsideTheLESSCSSPreprocessor问题描述在原生CSS中有以下的函数:calc()、max()、min()等,而在Less中也有同名的函数,使用的时候可能会冲突,无法得到需要的结......
  • 华为iStack、 CSS 、Eth-Trunk、 M-LAG
    一、iStack设备堆叠1、定义堆叠是指将多台支持堆叠的特性交换机设备组合在一起,从逻辑上组合成一台交换设备。2、为什么要使用堆叠技术?(3个优点)通过交换机堆叠,可以实现网络高可靠性和网络大量数据转发,同时简化网络管理。3、iStack基本概念角色(堆叠中所有的交换机都称为成员交换机)主......