Flip Card

Size
2,343 Kb
Views
12,144

How do I make an flip card?

Using CSS Transforms to flip a card over.. What is a flip card? How do you make a flip card? This script and codes were developed by James Steinbach on 05 November 2022, Saturday.

Flip Card Previews

Flip Card - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Flip Card</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="flip-box"> <div class="flip-box-front"> <h1>Let's Flip This!</h1> <a class="front-toggle" href="">Click</a> </div> <div class="flip-box-back"> <p>That was probably the coolest thing you've done all day, amiright?</p> <a class="back-toggle" href="">Back</a> </div>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Flip Card - Script Codes CSS Codes

body { background: #16a085;
}
.flip-box { -webkit-box-sizing: border-box; box-sizing: border-box; position: relative; width: 15em; height: 15em; margin: 2em auto; overflow: hidden; color: #fff; border: 2px solid #fff; border-radius: .5em; display: block; font-family: Gotham, "Proxima Nova","Open Sans",Helvetica, sans-serif; text-align: center; -webkit-transition: box-shadow .4s .45s, -webkit-transform 1s ease-in-out; -webkit-transform-style: preserve-3d; -webkit-perspective: 150px; -webkit-transform-origin: bottom;
}
[class^="flip-box-"] { position: absolute; top: 0; right: 0; bottom: 0; left: 0; padding: 2em; z-index: 2; -webkit-perspective: 150px; -webkit-transition: opacity .25s .25s linear;
}
h1 { padding-top: 5%;
}
p { padding-top: 5%;
}
a { display: inline-block; background: #1abc9c; color: #fff; border-radius: .25em; padding: .25em .5em; text-decoration: none;
}
.flip-box-back { -webkit-transform: rotateX(180deg); -webkit-transition: color .2s .5s, background .2s .5s ease-in-out, opacity .25s .4s linear; z-index: 1; opacity: 0;
}
.flip-box.flipped { -webkit-transform: rotateX(180deg) translateY(15em) translateZ(40px); box-shadow: 0 0 .5em #000;
}
.flipped .flip-box-front { opacity: 0;
}
.flipped .flip-box-back { background: #fff; color: #222; z-index: 3; opacity: 1;
}

Flip Card - Script Codes JS Codes

$('.front-toggle').click(function(e) { e.preventDefault(); $('.flip-box').addClass('flipped');
});
$('.back-toggle').click(function(e) { e.preventDefault(); $('.flip-box').removeClass('flipped');
});
Flip Card - Script Codes
Flip Card - Script Codes
Home Page Home
Developer James Steinbach
Username jdsteinbach
Uploaded November 05, 2022
Rating 4.5
Size 2,343 Kb
Views 12,144
Do you need developer help for Flip Card?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

James Steinbach (jdsteinbach) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!