Skip to content

Instantly share code, notes, and snippets.

@neurodynamic
Created September 24, 2015 01:42
Show Gist options
  • Save neurodynamic/37c59cacd4a8ba483844 to your computer and use it in GitHub Desktop.
Save neurodynamic/37c59cacd4a8ba483844 to your computer and use it in GitHub Desktop.
Checkout progress bar css styles. Vendor prefixes NOT included in CSS.
ul.progress {
list-style: none;
margin: auto;
height: 100px;
background-color: transparent;
display: flex;
justify-content: space-between;
}
ul.progress li {
background-color: transparent;
display: flex;
align-items: center;
opacity: 0.5;
transition: 1s;
text-align: center;
}
ul.progress li.active a {
background-color: teal;
}
ul.progress li.active:not(:first-child)::before {
color: white;
background-color: teal;
}
ul.progress li.active:not(:last-child)::after {
color: white;
background-color: teal;
}
ul.progress li a {
color: white;
background-color: black;
height: 100px;
width: 100px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
transition: 1s;
cursor: pointer;
padding: 5px;
}
ul.progress li:not(:last-child)::after {
content: " ";
color: white;
background-color: black;
width: 5px;
height: 35px;
margin-left: -5px;
transition: 1s;
}
ul.progress li:not(:first-child) {
flex: 1;
}
ul.progress li:not(:first-child)::before {
transition: 1s;
flex: 1;
content: " ";
color: white;
background-color: black;
min-width: 1px;
height: 35px;
margin-right: -5px;
}
ul.progress li.complete {
opacity: 0.7;
}
ul.progress li.complete a {
color: white;
background-color: blue;
}
ul.progress li.complete:not(:first-child)::before {
color: white;
background-color: blue;
}
ul.progress li.complete:not(:last-child)::after {
color: white;
background-color: blue;
}
<ul class="progress"><li class="complete"><a>step 1</a></li><li class="complete"><a>step 2</a></li><li class="complete"><a>...</a></li><li class="active"><a>profit</a></li><li><a>confront troubling realities about the amorality of capitalism</a></li></ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment