bootstrapprogressbar 추가 및 알림
2286 단어 프런트엔드
<div class="progress progress-striped active" style="height: 45%; width: 80%; ">
<div class="progress-bar progress-bar-success " id="time" role="progressbar"
aria-valuenow="20"aria-valuemin="0" aria-valuemax="100" style="width:20%;
text-align: center; background-color: #FFCC66">
id="times" style="font-size: 4rem; line-height: 1.5; color: #cc9900;">
div>
div>
위의 코드는progressbar이고, 아래는progressbar에 알림 내용을 추가합니다.
var myDate = new Date();
var progress = Math.round((myDate.getMinutes() + myDate.getHours() * 60) / (24 * 60) * 100) + "%";
window.parent.document.getElementById("times").innerHTML = (Math.round((myDate.getMinutes() + myDate.getHours() * 60) / (24 * 60) * 100) + "%");
$("#time").css('width', progress);
참고 문장https://blog.csdn.net/i10630226/article/details/49906781