CSS striped progress

Jmnote (토론 | 기여)님의 2020년 9월 17일 (목) 03:22 판 (→‎개요)

1 개요

CSS striped progres
<style>
  .progress {
    overflow: hidden;
    font-size: .75rem;
    background-color: #e9ecef;
    border-radius: .25rem;
  }
  .progress-bar {
    display: flex;
    flex-direction: column;
    text-align: center;
    color: #fff;
    transition: width 1s ease;
    background-color: #007bff;
    background-image: linear-gradient(45deg,#fff2 25%,#fff0 25%,#fff0 50%,#fff2 50%,#fff2 75%,#fff0 75%,#fff0);
    background-size: 1rem 1rem;
    animation: stripes 1s linear infinite;
  }
  @keyframes stripes {
    to { background-position: 0 31px; }
  }
</style>
<div class="progress">
  <div class="progress-bar" style="width: 70%">진행중입니다</div>
</div>
<style>
  .meter {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.meter>i {
  position: absolute;
  left: -46px;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: -1;
  background: repeating-linear-gradient(
    -55deg,
    #f006 1px,
    #fff6 2px,
    #fff6 5px,
    #00f6 6px,
    #00f6 10px,
    #fff6 11px,
    #fff6 15px,
    #f006 16px,
    #f006 20px
  );
  animation: move 1s linear infinite;
}
@keyframes move {
  to {
    background-position: 46px 0;
  }
}
</style>
<div class="meter">이발소<i></i></div>

2 참고

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