<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<section class="container">
<section class="timeline">
<figure class="timeline--inner"><i class="timeline--inner-pin is-featured" data-title="Featured Pin"></i><i class="timeline--inner-pin is-normal" data-title="Normal Pin"></i><i class="timeline--inner-pin is-normal" data-title="Normal Pin"></i><i class="timeline--inner-pin is-featured" data-title="Featured Pin"></i><i class="timeline--inner-pin is-normal" data-title="Normal Pin"></i><i class="timeline--inner-pin is-normal" data-title="Normal Pin"></i><i class="timeline--inner-pin is-featured" data-title="Featured Pin"></i><i class="timeline--inner-pin is-normal" data-title="Normal Pin"></i><i class="timeline--inner-pin is-normal" data-title="Normal Pin"></i><i class="timeline--inner-pin is-featured" data-title="Featured Pin"></i><i class="timeline--inner-pin is-normal" data-title="Normal Pin"></i>
</figure>
</section>
<footer>
<h6>Hover on pin!</h6>
</footer>
</section>
@import url(https://fonts.googleapis.com/css?family=Lato:300,400);
* {
box-sizing: border-box;
}
*:active, *:focus {
border: 0;
outline: 0;
}
html, body {
min-height: 100%;
padding: 0;
margin: 0;
}
html {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
background-color: #212020;
color: #3949AB;
font-family: Lato, Helvetica, Times, serif;
font-size: 1.15rem;
line-height: 1.618;
text-rendering: optimizeLegibility;
-webkit-font-feature-settings: "liga", "kern";
}
img {
border-width: 0;
max-width: 100%;
}
a {
color: #EC407A;
text-decoration: none;
}
a:hover {
color: #E91E63;
}
::-moz-selection {
color: #212020;
background-color: rgba(255, 235, 59, 0.95);
}
::selection {
color: #212020;
background-color: rgba(255, 235, 59, 0.95);
}
h1 {
font-size: 3.25rem;
font-weight: 300;
line-height: 1;
margin: 1em auto 0;
word-spacing: -0.1em;
}
h6 {
font-size: .95rem;
font-weight: 300;
line-height: 1;
margin: 0 auto;
word-spacing: -0.1em;
}
p {
color: #EC407A;
}
.container {
max-width: 95%;
width: 45rem;
margin-left: auto;
margin-right: auto;
text-align: center;
}
.timeline {
position: relative;
display: block;
width: 100%;
height: 4rem;
margin: 3rem auto;
background-image: linear-gradient(to right, #880E4F, #E91E63 50%, #F06292);
background-repeat: no-repeat;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FF880E4F', endColorstr='#FFF06292', GradientType=1);
border-radius: 5px;
}
.timeline--inner {
position: absolute;
display: block;
top: 50%;
right: 1rem;
left: 1rem;
height: 6px;
margin: 0;
margin-top: -3px;
border: 0;
background: rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 2px rgba(255, 255, 255, 0.1), 0 1px 1px rgba(0, 0, 0, 0.2) inset;
border-radius: 1em;
z-index: 1;
}
.timeline--inner-pin {
position: absolute;
display: block;
top: 50%;
left: 0;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
background-color: #F06292;
border-radius: 100%;
cursor: help;
box-shadow: 0 0 0 2px #ffffff, 0 2px 6px rgba(0, 0, 0, 0.35);
transition: all 0.7s ease;
}
.timeline--inner-pin:nth-of-type(0) {
background-color: #5a0934;
left: -10%;
}
.timeline--inner-pin:nth-of-type(1) {
background-color: #66103c;
left: 0%;
}
.timeline--inner-pin:nth-of-type(2) {
background-color: #721743;
left: 10%;
}
.timeline--inner-pin:nth-of-type(3) {
background-color: #7e1e4b;
left: 20%;
}
.timeline--inner-pin:nth-of-type(4) {
background-color: #8a2552;
left: 30%;
}
.timeline--inner-pin:nth-of-type(5) {
background-color: #962d5a;
left: 40%;
}
.timeline--inner-pin:nth-of-type(6) {
background-color: #a23461;
left: 50%;
}
.timeline--inner-pin:nth-of-type(7) {
background-color: #ae3b69;
left: 60%;
}
.timeline--inner-pin:nth-of-type(8) {
background-color: #ba4270;
left: 70%;
}
.timeline--inner-pin:nth-of-type(9) {
background-color: #c64978;
left: 80%;
}
.timeline--inner-pin:nth-of-type(10) {
background-color: #d2507f;
left: 90%;
}
.timeline--inner-pin:nth-of-type(11) {
background-color: #de5787;
left: 100%;
}
.is-featured {
width: 14px;
height: 14px;
}
.is-normal {
width: 8px;
height: 8px;
}
[data-title] {
white-space: nowrap;
}
[data-title]:after {
content: attr(data-title);
position: absolute;
bottom: 100%;
left: 50%;
padding: 0.5rem;
color: #333;
font-size: .75rem;
font-style: normal;
background-color: #eee;
border-radius: 5px;
opacity: 0;
transition: 0.25s cubic-bezier(0.905, -0.25, 0.52, 1);
-webkit-transform: translateX(-50%) rotate(5deg);
transform: translateX(-50%) rotate(5deg);
pointer-events: none;
z-index: 2;
}
[data-title]:hover:after {
margin-bottom: 18px;
opacity: 1;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
[data-title]:before {
content: '';
position: absolute;
bottom: 100%;
left: 50%;
margin-bottom: -16px;
border: 10px solid transparent;
border-top-color: #eee;
opacity: 0;
transition: 0.25s cubic-bezier(0.905, -0.25, 0.52, 1);
-webkit-transform: translateX(-50%) rotate(5deg);
transform: translateX(-50%) rotate(5deg);
pointer-events: none;
z-index: 3;
}
[data-title]:hover:before {
margin-bottom: -1px;
opacity: 1;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}