Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>modern flip card</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <link rel="stylesheet" type="text/css" href="card.css">
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-12 col-lg-4">
            <div class="card">
                <label for="card1" aria-hidden="true" class="d-block w-100 h-100">
                    <input type="checkbox" id="card1" class="more" aria-hidden="true">
                    <div class="content">
                        <div class="front" style="background-image: url('https://images.pexels.com/photos/326055/pexels-photo-326055.jpeg')">
                            <div class="inner position-relative text-center">
                            </div>
                            <div class="caption text-center">

                                <h3>IMAGINE DRAGONS</h3>
                            </div>
                        </div>
                        <div class="back">
                            <ul class="nav justify-content-center nav-justified" role="tablist">
                                <li class="nav-item active">
                                    <a class="nav-link   show" href="#bio" role="tab" data-toggle="tab">Bio</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#album" role="tab" data-toggle="tab">Albums</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#songs" role="tab" data-toggle="tab">Songs</a>
                                </li>
                            </ul>
                            <div class="tab-content ">
                                <div role="tabpanel" class="tab-pane fade show active" id="bio">
                                    <div class="bio">
                                        <h3 id="bio_title">IMAGINE DRAGONS</h3>
                                        <span id="bio_description">
                                            Imagine Dragons is an alternative-rock band from Las Vegas, Nevada. Band members include frontman Dan Reynolds, bassist Ben McKee, guitarist Wayne Sermon, and drummer Daniel Platzman.
                                        </span>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane fade" id="album">
                                    <div class="bio inline">
                                        <div class="row text-center">
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane fade" id="songs">
                                    <div class="songs">
                                        <div class="row">
                                            <div class="col">
                                                <ul class="list-group list-group-flush list-unstyled">
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4 ">
                                                                <img class="p-1" src='./images/Rectangle%2018@2x.png'
                                                                     width="80" height="90"/>
                                                            </div>
                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Thunder</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Origins - Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4 ">
                                                                <img class="p-1" src='./images/Rectangle%2019@2x.png'
                                                                     width="80"/>
                                                            </div>
                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Demons</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Smoke & Mirrors - Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4">
                                                                <img class="p-1" src='./images/Rectangle%2020.png'
                                                                     width="80"/>
                                                            </div>

                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Night Visions</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </label>
            </div>
        </div>
        <div class="col-12 col-lg-4">
            <div class="card">
                <label for="card2" aria-hidden="true" class="d-block w-100 h-100">
                    <input type="checkbox" id="card2" class="more" aria-hidden="true">
                    <div class="content">
                        <div class="front" style="background-image: url('https://images.pexels.com/photos/814499/pexels-photo-814499.jpeg')">
                            <div class="inner position-relative text-center">
                            </div>
                            <div class="caption text-center">

                                <h3>IMAGINE DRAGONS</h3>
                            </div>
                        </div>
                        <div class="back">
                            <ul class="nav justify-content-center nav-justified" role="tablist">
                                <li class="nav-item active">
                                    <a class="nav-link   show" href="#bio2" role="tab" data-toggle="tab">Bio</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#album2" role="tab" data-toggle="tab">Albums</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#songs2" role="tab" data-toggle="tab">Songs</a>
                                </li>
                            </ul>
                            <div class="tab-content ">
                                <div role="tabpanel" class="tab-pane fade show active" id="bio2">
                                    <div class="bio">
                                        <h3 id="bio_title">IMAGINE DRAGONS</h3>
                                        <span id="bio_description">
                                            Imagine Dragons is an alternative-rock band from Las Vegas, Nevada. Band members include frontman Dan Reynolds, bassist Ben McKee, guitarist Wayne Sermon, and drummer Daniel Platzman.
                                        </span>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane fade" id="album2">
                                    <div class="bio inline">
                                        <div class="row text-center">
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane fade" id="songs2">
                                    <div class="songs">
                                        <div class="">
                                            <div class="col">
                                                <ul class="list-group list-group-flush list-unstyled">
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4 ">
                                                                <img class="p-1" src='./images/Rectangle%2018@2x.png'
                                                                     width="80" height="90"/>
                                                            </div>
                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Thunder</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Origins - Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4 ">
                                                                <img class="p-1" src='./images/Rectangle%2019@2x.png'
                                                                     width="80"/>
                                                            </div>
                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Demons</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Smoke & Mirrors - Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4">
                                                                <img class="p-1" src='./images/Rectangle%2020.png'
                                                                     width="80"/>
                                                            </div>

                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Night Visions</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </label>
            </div>
        </div>
        <div class="col-12 col-lg-4">
            <div class="card">
                <label for="card3" aria-hidden="true" class="d-block w-100 h-100">
                    <input type="checkbox" id="card3" class="more" aria-hidden="true">
                    <div class="content">
                        <div class="front" style="background-image: url('https://images.pexels.com/photos/257840/pexels-photo-257840.jpeg')">
                            <div class="inner position-relative text-center">
                            </div>
                            <div class="caption text-center">

                                <h3>IMAGINE DRAGONS</h3>
                            </div>
                        </div>
                        <div class="back">
                            <ul class="nav justify-content-center nav-justified" role="tablist">
                                <li class="nav-item active">
                                    <a class="nav-link   show" href="#bio3" role="tab" data-toggle="tab">Bio</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#album3" role="tab" data-toggle="tab">Albums</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" href="#songs3" role="tab" data-toggle="tab">Songs</a>
                                </li>
                            </ul>
                            <div class="tab-content ">
                                <div role="tabpanel" class="tab-pane fade show active" id="bio3">
                                    <div class="bio">
                                        <h3 id="bio_title">IMAGINE DRAGONS</h3>
                                        <span id="bio_description">
                                            Imagine Dragons is an alternative-rock band from Las Vegas, Nevada. Band members include frontman Dan Reynolds, bassist Ben McKee, guitarist Wayne Sermon, and drummer Daniel Platzman.
                                        </span>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane fade" id="album3">
                                    <div class="bio inline">
                                        <div class="row text-center">
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>
                                            <div class="col">
                                                <div>
                                                    <img class="" src='./images/Ellipse%201.png' width="80"/>
                                                </div>
                                                <div>
                                                    <span class="" id="albums_title">Albums</span>
                                                </div>
                                            </div>

                                        </div>
                                    </div>
                                </div>
                                <div role="tabpanel" class="tab-pane fade" id="songs3">
                                    <div class="songs">
                                        <div class="">
                                            <div class="col">
                                                <ul class="list-group list-group-flush list-unstyled">
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4 ">
                                                                <img class="p-1" src='./images/Rectangle%2018@2x.png'
                                                                     width="80" height="90"/>
                                                            </div>
                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Thunder</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Origins - Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4 ">
                                                                <img class="p-1" src='./images/Rectangle%2019@2x.png'
                                                                     width="80"/>
                                                            </div>
                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Demons</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Smoke & Mirrors - Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                    <li class="list-group-item">
                                                        <div class="row">
                                                            <div class="col-4">
                                                                <img class="p-1" src='./images/Rectangle%2020.png'
                                                                     width="80"/>
                                                            </div>

                                                            <div class="col-8 text-left">
                                                                <div class="d-flex">
                                                                    <span > Night Visions</span>
                                                                    <small class="ml-auto">4:05 min</small>
                                                                </div>
                                                                <small>Imagine Dragons</small>
                                                            </div>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </label>
            </div>
        </div>

    </div>
</div>

</body>
<script>
    $('li > a').on('click', function () {
        $('li').removeClass();
        $('li').addClass('nav-item');
        $(this).parent().addClass('nav-item active');
    });
</script>
</html>
              
            
!

CSS

              
                a{
    color: #354067;
    letter-spacing:1px;
    margin-left: 20px;
}
a:hover{
    text-decoration: none;
    color: red;
}
#nav { text-align: center; }
ul{
    text-align: center;
}

.card {
    height: 340px;
    margin: 1em;
    perspective: 1500px;
}

.card .content {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.75, 0, 0.85, 1);
}

.more {
    display: none;
}

.more:checked ~ .content {
    transform: rotateY(180deg);
}
.active a{
    color: red;
    border-bottom: 2px solid red !important;
    padding-bottom: 14px;
}
.front, .back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform-style: preserve-3d;
    border-radius: 6px;
}

.front .inner, .back .inner {
    height: 100%;
    display: flex;
    transform: translateZ(80px) scale(1);
}

.front {
    background-color: #fff;
    background-size: cover;
    background-position: center;

    background-image: linear-gradient(to bottom,
    rgba(255, 255, 255, 50),
    rgba(255, 255, 255, 50)
    100%);
}

.front:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 6px;
    backface-visibility: hidden;
}

.front h2 {
    grid-row: 2;
    margin-bottom: 0.3em;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
}

.back {
    transform: rotateY(180deg);
    background-color: #fff;
    border: 2px solid #f0f0f0;
}

.back .info {
    position: relative;
    display: flex;
    align-items: center;
    color: #355cc9;
    grid-row: 3;
}

.back .info:not(:first-of-type):before {
    content: '';
    position: absolute;
    left: -0.9em;
    height: 18px;
    width: 1px;
    background-color: #ccc;
}

.back .info span {
    font-size: 2em;
    font-weight: 700;
}

.back .info i {
    font-size: 1.2em;
}

.back .info .icon {
    margin-left: 0.3em;
}

.back .info .icon span {
    display: block;
    margin-top: -0.25em;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

.back .description {
    width: 100% !important;
    grid-column: -1;
    font-size: 0.86em;
    border-radius: 5px;
    font-weight: 600;
    line-height: 1.4em;
    overflow: auto;
    color: #355cc9;
    padding-right: 10px;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #859ddf;
}

::-webkit-scrollbar-thumb:hover {
    background: #355cc9;
}
.bio {
    margin: 15px;
    color: #354067;
}
.songs{
    margin-top: 15px;
    color: #354067;
}
.bio #bio_title
{
    color: #354067;
}
.bio #bio_description
{
    font-size:12px ;
}

#songs{
    margin: 15px;
    color: #354067;
}

.card label {
    cursor: pointer;
}
.caption {
    position: absolute;
    top: 80%;
    left: 0;
    width: 100%;
    color: white;
}
.nav a{
    margin: 0px;
}
              
            
!

JS

              
                
              
            
!
999px

Console