CSS 프로그레스바 애니메이션

1 개요[ | ]

CSS 프로그레스바 애니메이션
.shim {
  position: relative;
  overflow: hidden;
  background-color: rgba(255, 0, 0, 0.7);
}
.shim::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(233, 233, 233, 1) 0,
    rgba(233, 233, 233, 0.9) 50%,
    rgba(233, 233, 233, 0.8) 100%
  );
  animation: shimmer 3s ease-out infinite;
  content: "";
}

@keyframes shimmer {
  100% {
    transform: translateX(0%);
    opacity: 0;
  }
}

<div class="p-10 flex flex-col space-y-3">
  <div class="relative w-full sm:w-1/2 bg-gray-200 rounded">
    <div style="width: 100%" class="absolute top-0 h-4 rounded shim"></div>
  </div>
</div>


2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}