<header><h1 tabindex="0" id="title">New Albums this week</h1></header>
<section class="cards">
<div class="cards__single">
<div class="cards__front">
<img
class="cards__image"
src="https://images.unsplash.com/photo-1514924527133-371124f6f5e3?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=667&q=80"
alt="Bon Iver album"
/>
<h1 class="cards__artist" tabindex="0">Bon Iver</h1>
<p class="cards__album" tabindex="0">
<strong>For Emma, Forever Ago</strong>
</p>
</div>
<div class="cards__back">
<h2 tabindex="0">Songs</h2>
<ol>
<li>Flume</li>
<li>Lump Sum</li>
<li>Skinny Love</li>
<li>The Wolves</li>
<li>Blind Sided</li>
<li>Creature Fear</li>
<li>Team</li>
<li>For Emma</li>
<li>re:Stacks</li>
</ol>
<p class="cards__year">Year: 2008</p>
</div>
</div>
<div class="cards__single">
<div class="cards__front">
<img
class="cards__image"
src="https://images.unsplash.com/photo-1534254628711-b444d2945bcb?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=375&q=80"
alt="Guns N' Roses Album"
/>
<h1 class="cards__artist" tabindex="0">Guns N' Roses</h1>
<p class="cards__album" tabindex="0">
<strong>Apetite for Destruction</strong>
</p>
</div>
<div class="cards__back">
<h2 tabindex="0">Songs</h2>
<ol>
<li>Welcome to the Jungle</li>
<li>It'so Easy</li>
<li>Nightrain</li>
<li>Out Ta Get Me</li>
<li>Mr. Browstone</li>
<li>Paradise City</li>
<li>My Michelle</li>
<li>Think About You</li>
<li>Sweet Child of Mine</li>
<li>You're Crazy</li>
<li>Anything Goes</li>
<li>Rocket Queen</li>
</ol>
<p class="cards__year">Year: 1987</p>
</div>
</div>
<div class="cards__single">
<div class="cards__front">
<img
class="cards__image"
src="https://images.unsplash.com/photo-1542539097-00f1e264494f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=750&q=80"
alt="Arctic Monkeys album"
/>
<h1 class="cards__artist" tabindex="0">Arctic Monkeys</h1>
<p class="cards__album" tabindex="0"><strong>Humbug</strong></p>
</div>
<div class="cards__back">
<h2 tabindex="0">Songs</h2>
<ol>
<li>My Propeller</li>
<li>Crying Lightning</li>
<li>Dangerous Animals</li>
<li>Secret Door</li>
<li>Potion Approaching</li>
<li>Fire and the Thud</li>
<li>Cornerstone</li>
<li>Dance Little Liar</li>
<li>Pretty Visitors</li>
<li>The Jeweller's Hands</li>
</ol>
<p class="cards__year">Year: 2009</p>
</div>
</div>
<div class="cards__single">
<div class="cards__front">
<img
class="cards__image"
src="https://images.unsplash.com/photo-1584679109597-c656b19974c9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80"
alt="Leon Bridges album"
/>
<h1 class="cards__artist" tabindex="0">Leon Bridges</h1>
<p class="cards__album" tabindex="0"><strong>Coming Home</strong></p>
</div>
<div class="cards__back">
<h2 tabindex="0">Songs</h2>
<ol>
<li>Coming Home</li>
<li>Better Man</li>
<li>Brown Skin Girl</li>
<li>Smooth Sailin</li>
<li>Shine</li>
<li>Lisa Sawyer</li>
<li>Flowers</li>
<li>Pull Away</li>
<li>Twistin' & Groovin</li>
<li>River</li>
</ol>
<p class="cards__year">Year: 2009</p>
</div>
</div>
</section>
body {
background: #eceee5;
}
#title {
color: #20263f;
font-family: "Dosis", sans-serif;
font-weight: 400;
font-size: 50px;
display: block;
text-align: center;
}
.cards {
display: flex;
flex-direction: column;
justify-content: center;
align-content: center;
align-items: center;
}
.cards__single {
background: #a64e43;
display: flex;
flex-direction: column;
width:80%;
margin-top: 20px;
border-radius: 16px;
box-shadow: 0 5px 18px rgba(0, 0, 0, 0.6);
cursor: pointer;
text-align: center;
}
.cards__image {
text-align: center;
width: 100%;
border-radius: 16px;
}
.cards__artist,
.cards__album {
color: #20263f;
}
.cards__front img {
margin: 0;
height: 250px;
}
.cards__album {
font-style: italic;
}
h2 {
margin: 0;
text-align: center;
}
li {
line-height: 21px;
}
//You can see full tutorial here
//https://www.ricardomoreira.io/blog/2020-06-15-flip-cards-with-javascript
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.