Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 애니메이션프로그레스바
- #push() 함수 #Object.keys()함수 #Object.values()함수 #Object.entries()함수
- nginx설치
- git remote: Permission to .. denied to error: 403 에러
- 부트스트랩 프로그레스바
- animation progressbar
- 자바스크립트객체배열로
- JSON.parse()
- node-sass #sass #사스
- CSS버튼애니메이션 #버튼클릭하면
- nginx루트경로변경
- 클릭display:none #클릭하면버튼노출
- nginx와php연동
- vanillajs
- PHP설치
- 이미지유무체크
- 자바스크립트객체를문자열로
- 빗버킷ssh
- 체크박스
- PHP에서데이터로그
- JSON.stringify()
- node-sass #dart-sass
- 바닐라자바스크립트 텍스트 바꾸기
- 버튼클릭하면박스나타남 #버튼클릭시박스노출 #버튼클릭시아래버튼밀어내림
- 바닐라자바스크립트
- CSS버튼효과
Archives
- Today
- Total
●▲■ 개발일기
[bootstrap] 부트스트랩 스타일 프로그래스바 progressBar 본문
이거 쉽게 찾을 수 있을거라 생각하고 구글링했는데 한참 찾았음.
1.5초 이후에 프로그래스 바 게이지가 올라가는 애니메이션도 추가함.
<style>
/* 프로그래스바 */
.progress-wrap {
width: calc(100% - 4.8rem);
margin: 0 auto;
}
.progress {
background: #eee;
-webkit-border-radius: 2rem;
-moz-border-radius: 2rem;
border-radius: 2rem;
box-shadow: inset 0 -1px 1px rgba(255,255,255,0.3);
display: block;
height: 2.5rem;
margin-bottom: 1rem;
padding: .5rem;
position: relative;
overflow: hidden;
}
.progress > span {
display: block;
height: 100%;
border-top-right-radius: 2rem;
border-bottom-right-radius: 2rem;
border-top-left-radius: 2rem;
border-bottom-left-radius: 2rem;
box-shadow: inset 0 2px 9px rgba(255,255,255,0.3) inset 0 -2px 6px rgba(0,0,0,0.4);
position: relative;
overflow: hidden;
transition: width 2s ease-out;
}
.paprica > span {
background-color: #ff4500;
}
.progress-bar-animated {
background-image: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.125) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.125) 50%, rgba(255, 255, 255, 0.125) 75%, transparent 75%, transparent);
background-image: linear-gradient(-45deg, rgba(255, 255, 255, 0.125) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.125) 50%, rgba(255, 255, 255, 0.125) 75%, transparent 75%, transparent);
background-size: 35px 35px;
-webkit-animation: progress-bar-stripes 1s linear infinite;
animation: progress-bar-stripes 1s linear infinite
}
.progress-bar-striped {
background-color: #ff4500;
}
@keyframes progress-bar-stripes {
0% {
background-position: 0 0
}
100% {
background-position: 35px 35px
}
}
@-webkit-keyframes progress-bar-stripes {
0% {
background-position: 0 0
}
100% {
background-position: 35px 35px
}
}
.progress-label {
position: relative;
font-size: 1.5rem;
font-weight: 400;
margin: 0 0 .1rem 0;
}
.progress-label span {
font-size: 1.8rem;
font-weight: 600;
margin: 0 0 .1rem 0;
color: #FC630E;
}
</style>
<!-- 라벨 -->
<p class="progress-label">
<span>현재 80명 참여</span> (80/100)
</p>
<!-- progressBar -->
<div class="progress paprica">
<span class="progress-bar-striped progress-bar-animated" data-progress="80" style="width:0;"></span>
</div>
<script>
var bars = document.querySelectorAll('.progress > span');
setInterval(function(){
bars.forEach(function(bar){
var getWidth = parseFloat(bar.dataset.progress);
for(var i = 0; i < getWidth; i++) {
bar.style.width = i + '%';
}
});
}, 1500); // 1.5초 이후에 그래프가 올라감
</script>
'👉 javascript' 카테고리의 다른 글
[javascript] 체크박스 클릭하면 오른쪽 텍스트에 line-through 적용. (0) | 2023.05.28 |
---|---|
[javascript] 이미지가 있는지 없는지 체크하여 default이미지 뿌려주는 함수. (0) | 2023.05.19 |
[JavaScript] display: none에서 block으로 transition animation의 적용. (0) | 2021.12.30 |
[JavaScript] 비밀번호 정규표현식 유효성 검사 (버튼 활성화) (0) | 2021.12.20 |
[JavaScript] 자바스크립트를 이용하여 간단한 텍스트 바꾸기(교체) (0) | 2021.12.19 |