<div class="parent">
<div class="child-level-1">
<div class="child child-1"></div>
<div class="child child-2"></div>
</div>
<div class="child-level-2">
<div class="child child-3"></div>
<div class="child child-4"></div>
</div>
</div>
/* To apply the background and center align the elemnts */
body {
background-color: #191919;
display: flex;
justify-content: center;
align-items: center;
height: 95vh;
}
/* Setting width to parent element */
.parent {
width: 260px;
}
/* Align the parent and child elements using flex */
.parent,
.child-level-1,
.child-level-2 {
display: flex;
justify-content: space-between;
}
/* Setting width and position to child-level div elements */
.child-level-1,
.child-level-2 {
position: relative;
width: 120px;
}
/* Music Notes bottom style */
.child {
height: 40px;
width: 50px;
border-radius: 50%;
}
.child.child-1,
.child.child-1::after,
.child.child-2,
.child.child-2::after,
.child.child-2::before,
.child.child-4,
.child.child-4::before,
.child.child-4::after {
background-color: #fe5f55;
}
/* Music Notes bars style */
.child.child-3,
.child.child-3::before,
.child.child-3::after {
background-color: #a64942;
}
.child::before,
.child::after {
position: absolute;
top: -80px;
}
.child::after,
.child.child-4::before {
content: "";
height: 100px;
width: 10px;
}
.child.child-1::after,
.child.child-3::after {
right: 70px;
}
.child.child-2::after,
.child.child-4::after {
right: 0;
}
.child.child-2::before {
content: "";
height: 10px;
width: 60px;
right: 10px;
}
.child.child-3::before {
content: "";
height: 10px;
width: 30px;
right: 40px;
}
.child.child-4::after {
content: "";
background: transparent;
height: 10px;
border: 10px solid #fe5f55;
right: -30px;
width: 40px;
border-right: none;
border-left: none;
}
.child.child-4::before {
right: 0;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.