美文网首页
loading: 原子效果

loading: 原子效果

作者: xueyueshuai | 来源:发表于2023-07-02 13:55 被阅读0次
<template>
  <div class="preloader">
    <div class="center-div">
      <div class="line"></div>
      <div class="line"></div>
      <div class="line"></div>

      <!-- 小圆点  ● 或者 &#9679; -->
      <div class="point">
        &#9679;
      </div>
    </div>
  </div>
</template>

<script>

export default {
  name: '',
  data() {
    return {}
  },
  mounted() {
  },
  methods: {}
}
</script>

<style lang="scss" scoped>
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: none repeat scroll 0 0 #444;

  display: flex;
  justify-content: center;
  align-items: center;

  .center-div {
    overflow: hidden;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    position: relative;

    .point {
      position: absolute;
      color: #EFEFFA;
      font-size: 15px;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    .line {
      box-sizing: border-box;
      position: absolute;
      width: 100%;
      height: 100%;
      border-radius: 50%;
      border-left: calc(60px / 25) solid #EFEFFA;

      &:nth-child(1) {
        transform: rotateZ(120deg) rotateX(66deg) rotateZ(0deg);
        animation: line-animation-1 1s linear infinite;
      }

      &:nth-child(2) {
        transform: rotateZ(240deg) rotateX(66deg) rotateZ(0deg);
        animation: line-animation-2 1s linear infinite;
      }

      &:nth-child(3) {
        transform: rotateZ(360deg) rotateX(66deg) rotateZ(0deg);
        animation: line-animation-3 1s linear infinite;
      }

      @keyframes line-animation-1 {
        100% {
          transform: rotateZ(120deg) rotateX(66deg) rotateZ(360deg);
        }
      }
      @keyframes line-animation-2 {
        100% {
          transform: rotateZ(240deg) rotateX(66deg) rotateZ(360deg);
        }
      }
      @keyframes line-animation-3 {
        100% {
          transform: rotateZ(360deg) rotateX(66deg) rotateZ(360deg);
        }
      }
    }
  }
}
</style>

相关文章

网友评论

      本文标题:loading: 原子效果

      本文链接:https://www.haomeiwen.com/subject/txefudtx.html