"Flip Card on hover"
Bootstrap 4.1.1 Snippet by iammohitverma

<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 ----------> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Flip Card Hover Effect</title> <link rel="stylesheet" href="css/style.css"> </head> <body> <div class="card"> <div class="cardinner"> <div class="frontface"> <h2>Front Face</h2> </div> <div class="backface"> <h2>Back Face</h2> </div> </div> </div> </body> </html>
* { margin: 0px; padding: 0px; box-sizing: border-box; } body { background-color: #2f3640; width: 100%; min-height: 100vh; display: flex; justify-content: center; align-items: center; } h2 { color: #fff; font-family: poppins; transform: translateZ(10px); font-size: 24px; } .card { width: 200px; height: 250px; position: relative; transform: perspective(500px); background-color: transparent; outline: none; border: none; } .cardinner { position: absolute; top: 0; left: 0; width: 100%; height: 100%; transform-style: preserve-3d; transition: 1s; transform: perspective(500px); } .frontface, .backface { backface-visibility: hidden; width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: flex; justify-content: center; align-items: center; border-radius: 5px; transform-style: preserve-3d; } .frontface { background: #fbc531; } .backface { background: #00a8ff; transform: rotateY(180deg); } .card:hover .cardinner { transform: rotateY(180deg); }

Related: See More


Questions / Comments: