CSS3创建的Circle Loader动画特效代码

所属分类: 网页特效-动画效果    2023-12-18 11:22:41

CSS3创建的Circle Loader动画特效代码 ie兼容6
反馈问题  查看演示  登录后下载 温馨提示
登录会员即可享受免费下载
 我要建站

CSS3创建的Circle Loader动画特效代码(共2个文件)

    • index.html

使用方法

@property --nose {
  syntax: "<percentage>";
  initial-value: 0%;
  inherits: true;
}

@property --tail {
  syntax: "<percentage>";
  initial-value: 0%;
  inherits: true;
}

:root {
  --size: 25;
}
.cd__main{
   background: hsl(0, 0%, 8%) !important;
}

body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  background: hsl(0, 0%, 8%);
}

.loader {
  height: calc(var(--size) * 1vmin);
  width: calc(var(--size) * 1vmin);
  position: relative;
  border-style: solid;
  border-width: 5vmin;
  border-color: transparent;
  border-radius: 50%;
  -webkit-mask: conic-gradient(
    from 45deg,
    transparent 0 var(--tail),
    white 0 var(--nose),
    transparent 0
  );
          mask: conic-gradient(
    from 45deg,
    transparent 0 var(--tail),
    white 0 var(--nose),
    transparent 0
  );
  -webkit-animation: load 2.5s both infinite ease-in-out, spin 3.25s infinite linear;
          animation: load 2.5s both infinite ease-in-out, spin 3.25s infinite linear;
}

.loader::after {
  content: "";
  position: absolute;
  inset: -5vmin;
  background: conic-gradient(
      from 95deg in hsl longer hue,
      hsl(240deg 100% 75%),
      hsl(240deg 100% 75%)
    ) -5vmin -5vmin / calc(100% + 10vmin) calc(100% + 10vmin);
  background: goldenrod;
  border-style: solid;
  border-width: 5vmin;
  border-color: transparent;
  border-radius: 50%;
  -webkit-mask: linear-gradient(white 0 0) padding-box,
    linear-gradient(white 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(white 0 0) padding-box exclude,
    linear-gradient(white 0 0);
}

@-webkit-keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@-webkit-keyframes load {
  0% {
    --tail: 0%;
    --nose: 0%;
  }
  40%,
  60% {
    --nose: 100%;
    --tail: 0%;
  }
  100% {
    --nose: 100%;
    --tail: 100%;
  }
}

@keyframes load {
  0% {
    --tail: 0%;
    --nose: 0%;
  }
  40%,
  60% {
    --nose: 100%;
    --tail: 0%;
  }
  100% {
    --nose: 100%;
    --tail: 100%;
  }
}

@supports (background: conic-gradient(from 95deg in hsl longer hue, red, red)) {
  .loader::after {
    background: conic-gradient(
        from 95deg in hsl longer hue,
        hsl(240deg 100% 75%),
        hsl(240deg 100% 75%)
      ) -5vmin -5vmin / calc(100% + 10vmin) calc(100% + 10vmin);
  }
}

站长提示:
1. 平台上所有素材资源,需注册登录会员方能正常下载。
2. 会员用户积极反馈网站、素材资源BUG或错误问题,每次奖励20K币
3. PHP源码类素材,如需协助安装调试,或你有二次开发需求,可联系苦力吧客服。
4. 付费素材资源,需充值后方能下载,如有任何疑问可直接联系苦力吧客服
相关资源 / 动画效果

jquery文本内容与运动粒子间平滑过渡变色特效代码

一款轻量级可自定义的元素变色插件,可在文本文字内容和运动粒子无感变色,还能平滑过渡!
  动画效果
 207  

CSS3+SVG创建的动画通知铃铛图标特效

一款纯css3铃铛动画特效代码,当鼠标悬停在上面时,它会放大并抖动。鼠标单击后,它将激活通知动画效果。
  动画效果
 354  

jquery可自定义控制的文本文字滚动插件

一款自定义控制的文字滚动插件,支持自定义:动态添加内容、隐藏指定元素、向上滚动、向下滚动等。
  动画效果
 217  

Three dot创建的多种形态的CSS加载动画

一组由三个小圆点创建的loading加载动画效果,包括:360度旋转、淡出淡入、摇摆转圈、跳动等20种动画加载特效。
  动画效果
 168  

评论数(0) 回复有机会获得K币 用户协议

^_^ 还没有人评论,快来抢个沙发!
😀
  • 😀
  • 😊
  • 😂
  • 😍
  • 😑
  • 😷
  • 😵
  • 😛
  • 😣
  • 😱
  • 😋
  • 😎
  • 😵
  • 😕
  • 😶
  • 😚
  • 😜
  • 😭
发表评论