A Pen by Dhiraj Indurthy on CodePen.
Created
April 8, 2019 14:19
-
-
Save dhindurthy/3ab48518681d690370234fd9980cbd92 to your computer and use it in GitHub Desktop.
html5-progress-element
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section class="container"> | |
<section class="item"> | |
<progress value="63" max="100">70 %</progress> | |
</section> | |
</section> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/axe-core/2.4.2/axe.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
margin:0 auto; | |
font-family:"Indie Flower","Comic Sans MS", cursive, sans-serif; | |
background-color: #333; | |
color: #77EDF4; | |
} | |
.container { | |
font-size: 12px; | |
display: flex; | |
align-items: center; | |
align-content: center; | |
justify-content: center; | |
height: 100vh; | |
} | |
progress { | |
width: 40rem; | |
height: 1.5rem; | |
-webkit-appearance: none; | |
-moz-appearance: none; | |
appearance: none; | |
border-radius: 0.25rem; | |
} | |
progress::-webkit-progress-value { | |
background: #77EDF4; | |
border-radius: 0.25rem; | |
-webkit-transition: width 1s; /* Safari */ | |
transition: width 2s; | |
} | |
progress::-webkit-progress-bar { | |
background-color: #eee; | |
border-radius: 0.25rem; | |
} | |
progress::-moz-progress-bar { | |
background-color: #77EDF4; | |
border-radius: 0.25rem; | |
-moz-transition: width 2s; | |
transition: width 2s; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://fonts.googleapis.com/css?family=Indie+Flower" rel="stylesheet" /> | |
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment