image loading2edit icon

作者:
lynn-ssk
Fork(复制)
下载
嵌入
设置
BUG反馈
index.html
现在支持上传本地图片了!
            
                <svg
      class="svg-ai-art-image-loading"
      width="80px"
      height="80px"
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
    >
      <defs>
        <style>
          .svg-ai-art-image-loading {
            --svg-image-loading-color: #999;
          }
          /* Border path */
          #border {
            stroke-dasharray: 68;
            stroke-dashoffset: 68;
            animation: animate-border 5s linear infinite;
          }
          @keyframes animate-border {
            0% {
              stroke-dashoffset: 68;
            }
            20% {
              stroke-dashoffset: 0;
            }
            20.01%,
            100% {
              stroke-dashoffset: 0;
            }
          }
          /* Curve (mountain) path */
          #curve {
            stroke-dasharray: 22;
            stroke-dashoffset: 22;
            visibility: hidden;
            animation: animate-curve 5s linear infinite;
          }
          @keyframes animate-curve {
            0%,
            20% {
              visibility: hidden;
              stroke-dashoffset: 22;
            }
            20.01% {
              visibility: visible;
              stroke-dashoffset: 22;
            }
            40% {
              visibility: visible;
              stroke-dashoffset: 0;
            }
            40.01%,
            100% {
              visibility: visible;
              stroke-dashoffset: 0;
            }
          }
          /* Circle path */
          #circle {
            stroke-dasharray: 12.56;
            stroke-dashoffset: 12.56;
            animation: animate-circle 5s linear infinite;
          }
          @keyframes animate-circle {
            0%,
            40% {
              stroke-dashoffset: 12.56;
            }
            60% {
              stroke-dashoffset: 0;
            }
            60.01%,
            100% {
              stroke-dashoffset: 0;
            }
          }
          /* Mountain fill */
          #curve-fill {
            fill: none;
            animation: animate-mountain-fill 5s linear infinite;
            clip-path: url(#mountain-clip);
          }
          @keyframes animate-mountain-fill {
            0%,
            60% {
              fill: none;
            }
            80% {
              fill: var(--svg-image-loading-color);
            }
            80.01%,
            100% {
              fill: var(--svg-image-loading-color);
            }
          }
          #mountain-clip-rect {
            y: 21;
            animation: animate-mountain-clip 5s linear infinite;
          }
          @keyframes animate-mountain-clip {
            0%,
            60% {
              y: 21;
            }
            80% {
              y: 13;
            }
            80.01%,
            100% {
              y: 13;
            }
          }
          /* Circle fill */
          #circle-fill {
            fill: none;
            animation: animate-circle-fill 5s linear infinite;
            clip-path: url(#circle-clip);
          }
          @keyframes animate-circle-fill {
            0%,
            80% {
              fill: none;
            }
            100% {
              fill: var(--svg-image-loading-color);
            }
          }
          #circle-clip-rect {
            y: 11;
            animation: animate-circle-clip 5s linear infinite;
          }
          @keyframes animate-circle-clip {
            0%,
            80% {
              y: 11;
            }
            100% {
              y: 7;
            }
          }
        </style>
        <clipPath id="mountain-clip">
          <rect id="mountain-clip-rect" x="0" y="21" width="24" height="8" />
        </clipPath>
        <clipPath id="circle-clip">
          <rect id="circle-clip-rect" x="7" y="11" width="4" height="4" />
        </clipPath>
      </defs>
      <!-- Border path -->
      <path
        id="border"
        d="M3 7C3 4.79086 4.79086 3 7 3H17C19.2091 3 21 4.79086 21 7V17C21 19.2091 19.2091 21 17 21H7C4.79086 21 3 19.2091 3 17V7Z"
        stroke="var(--svg-image-loading-color)"
        stroke-width="2"
      />
      <!-- Circle path (stroke) -->
      <path
        id="circle"
        d="M9 11C10.1046 11 11 10.1046 11 9C11 7.89543 10.1046 7 9 7C7.89543 7 7 7.89543 7 9C7 10.1046 7.89543 11 9 11Z"
        stroke="var(--svg-image-loading-color)"
        stroke-width="2"
        stroke-linecap="round"
        stroke-linejoin="round"
      />
      <!-- Curve (mountain) path -->
      <path
        id="curve"
        d="M4 20L6.87381 16.4077C7.51098 15.6113 8.65134 15.4342 9.5 16C10.3487 16.5658 11.489 16.3887 12.1262 15.5922L13.7254 13.5933C14.4252 12.7185 15.7069 12.5891 16.5675 13.3062L21.5 17.5"
        stroke="var(--svg-image-loading-color)"
        stroke-width="2"
      />
      <!-- Circle fill -->
      <path
        id="circle-fill"
        d="M9 11C10.1046 11 11 10.1046 11 9C11 7.89543 10.1046 7 9 7C7.89543 7 7 7.89543 7 9C7 10.1046 7.89543 11 9 11Z"
      />
      <!-- Mountain fill (closed polygon) -->
      <path
        id="curve-fill"
        d="M4 20L6.87381 16.4077C7.51098 15.6113 8.65134 15.4342 9.5 16C10.3487 16.5658 11.489 16.3887 12.1262 15.5922L13.7254 13.5933C14.4252 12.7185 15.7069 12.5891 16.5675 13.3062L20.8 17V20H4Z"
      />
    </svg>
        
预览
控制台
清空