<div class="container">
<div class="container__elements">
<div>
<label for="article">Article Progress:</label>
<progress id="article" max="100" value="50">50% </progress>
</div>
<div>
<label for="indeterminate">Async Task:</label>
<progress id="indeterminate" max="100"> </progress>
</div>
</div>
<!-- Social Connections -->
<div class="social-icons">
<a class="social-icon social-icon--codepen" href="https://codepen.io/braydoncoyer" target="_blank">
<i class="fa fa-codepen"></i>
<div class="tooltip">Codepen</div>
</a>
<a class="social-icon social-icon--twitter" href="https://twitter.com/BraydonCoyer" target="_blank">
<i class="fa fa-twitter"></i>
<div class="tooltip">Twitter</div>
</a>
</div>
</div>
$background: #ebf5fc;
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.container {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
min-height: 100vh;
background: $background;
&__elements {
}
}
/* --------Social Icons-------- */
/* Color Variables */
$color-codepen: #000;
$color-twitter: #2b97f1;
/* Social Icon Mixin */
@mixin social-icon($color) {
background: $color;
color: #fff;
.tooltip {
background: $color;
color: currentColor;
&:after {
border-top-color: $color;
}
}
}
.social-icons {
display: flex;
position: absolute;
bottom: 25px;
right: 25px;
}
.social-icon {
display: flex;
align-items: center;
justify-content: center;
position: relative;
width: 40px;
height: 40px;
margin: 0 0.7rem;
border-radius: 50%;
cursor: pointer;
font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
font-size: 1.5rem;
text-decoration: none;
transition: all 0.15s ease;
&:hover {
color: #fff;
.tooltip {
visibility: visible;
opacity: 1;
transform: translate(-50%, -150%);
}
}
&:active {
box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.5) inset;
}
&--twitter {
@include social-icon($color-twitter);
}
&--codepen {
@include social-icon($color-codepen);
}
i {
position: relative;
top: 1px;
}
}
/* Tooltips */
.tooltip {
display: block;
position: absolute;
top: 0;
left: 50%;
padding: 0.4rem 0.6rem;
border-radius: 40px;
font-size: 0.4rem;
font-weight: bold;
opacity: 0;
pointer-events: none;
text-transform: uppercase;
transform: translate(-50%, -100%);
transition: all 0.3s ease;
z-index: 1;
&:after {
display: block;
position: absolute;
bottom: 1px;
left: 50%;
width: 0;
height: 0;
content: "";
border: solid;
border-width: 10px 10px 0 10px;
border-color: transparent;
transform: translate(-50%, 100%);
}
}
View Compiled
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.