CSS Card Animation Effect by Uspacial

Add engaging animations to your portfolio, blogs, or landing pages with this sleek HTML and CSS code snippet.
CSS Card Animation Effect

CSS Card Animation Effect

Welcome to our tutorial on creating a simple and stylish card animation effect using CSS. This effect flips the card to reveal its backside when you hover over it, making it perfect for enhancing your website's interactivity.

Here’s the code you can use to create the effect:

<div class="card-container">
  <div class="card">
    <div class="front">Front Side</div>
    <div class="back">Back Side</div>
  </div>
</div>
    

To style this card, use the following CSS:

body {
  font-family: Arial, sans-serif;
  background-color: #f0f0f0;
}

.card-container {
  perspective: 1000px;
}

.card {
  width: 300px;
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
}

.card:hover {
  transform: rotateY(180deg);
}

.card .front,
.card .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: #fff;
}

.card .front {
  background-color: #007bff;
}

.card .back {
  background-color: #28a745;
  transform: rotateY(180deg);
}
    

Here’s a live demo of the card animation effect:

Front Side
Back Side

Isn't that amazing? You can easily implement this effect on your website or blog to make it more visually appealing. Stay tuned for more tutorials!

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.
NextGen Digital Welcome to WhatsApp chat
Howdy! How can we help you today?
Type here...