Creating animated presentation cards with JavaScript

Whether you're presenting the team behind your project or anything else, using animated presentation cards will give your page a successful finishing touch. Find out how in this article!
•
Updated on August 14, 2026
•
3 min read
Believemy logo

Whether it's to introduce the team behind your project or for any other purpose, using animated presentation cards will give a successful final touch to your page. Let’s discover how to do this in this article!

Image

 

Step 1

Let's start with the HTML code.

HTML
<div class="card card0">
  <div class="border">
    <h2>Al Pacino</h2>
    <div class="icons">
      <a href="#"><i class="fab fa-codepen"></i></a>
      <a href="#"><i class="fab fa-instagram"></i></a>
      <a href="#"><i class="fab fa-dribbble"></i></a>
      <a href="#"><i class="fab fa-twitter"></i></a>
      <a href="#"><i class="fab fa-facebook"></i></a>
    </div>
  </div>
</div>

<div class="card card1">
  <div class="border">
    <h2>Ben Stiller</h2>
    <div class="icons">
      <a href="#"><i class="fab fa-codepen"></i></a>
      <a href="#"><i class="fab fa-instagram"></i></a>
      <a href="#"><i class="fab fa-dribbble"></i></a>
      <a href="#"><i class="fab fa-twitter"></i></a>
      <a href="#"><i class="fab fa-facebook"></i></a>
    </div>
  </div>
</div>

<div class="card card2">
  <div class="border">
    <h2>Patrick Stewart</h2>
    <div class="icons">
      <a href="#"><i class="fab fa-codepen"></i></a>
      <a href="#"><i class="fab fa-instagram"></i></a>
      <a href="#"><i class="fab fa-dribbble"></i></a>
      <a href="#"><i class="fab fa-twitter"></i></a>
      <a href="#"><i class="fab fa-facebook"></i></a>
    </div>
  </div>
</div>

 

Step 2

For this example, we will use Flexbox on our body tag.

CSS
body {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  height: 100vh;
}

 

Step 3

Now, let's take care of the cards.

CSS
.card {
  height: 379px;
  width: 300px;
  border-radius: 10px;
  transition: all 0.8s;
  overflow: hidden;
  background: black;
  box-shadow: 0 70px 63px -60px #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

 

Step 4

So, we have our cards: let's integrate the white frame and its appearance on hover.

CSS
.border {
  height: 369px;
  width: 290px;
  border-radius: 10px;
  transition: all 1s;
  position: relative;
}

.border:hover {
    border: 1px solid white;
}

 

Step 5

We now have our cards and borders, but we only have black backgrounds... That's not very nice. Let's change that by adding photos to each card!

CSS
.card0 {
  background: url('https://i.pinimg.com/736x/8f/a0/51/8fa051251f5ac2d0b756027089fbffde--terry-o-neill-al-pacino.jpg') center center no-repeat;
  background-size: 300px;
}
    
.card0:hover {
    background: url('https://i.pinimg.com/736x/8f/a0/51/8fa051251f5ac2d0b756027089fbffde--terry-o-neill-al-pacino.jpg') left center no-repeat;
    background-size: 600px;
}

.card1 {
  background: url('https://i.pinimg.com/originals/28/d2/e6/28d2e684e7859a0dd17fbd0cea00f8a9.jpg') center center no-repeat;
  background-size: 300px;
}

.card1:hover {
    background: url('https://i.pinimg.com/originals/28/d2/e6/28d2e684e7859a0dd17fbd0cea00f8a9.jpg') left center no-repeat;
    background-size: 600px;
}

.card2 {
  background: url('https://i.pinimg.com/originals/ee/85/08/ee850842e68cfcf6e3943c048f45c6d1.jpg') center center no-repeat;
  background-size: 300px;
}

.card2:hover {
    background: url('https://i.pinimg.com/originals/ee/85/08/ee850842e68cfcf6e3943c048f45c6d1.jpg') left center no-repeat;
    background-size: 600px;
}

 

Step 6

Now, let's style our titles and icons.

CSS
.card h2 {
  font-family: Arial, sans-serif;
  color: white;
  margin: 20px;
  opacity: 0;
  transition: all 1s;
}

.fab {
  opacity: 0;
  transition: all 1s;
}

.icons {
  position: absolute;
  height: 130px;
  top: 226px;
  width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

a {
  color: white;
}

 

Step 7

Now, let's make the icons and card titles appear on hover.

CSS
.card:hover h2 {
    opacity: 1;
}

.card:hover .fab {
    opacity: 1;
}

 

Bravo! We're done!

Share your result on the official Believemy discussion channel!

Category: Developers

Share this article

Want to help us? Share this article on your networks or even better: on your site, in an article or in your newsletter.

Believemy logo
Comments (0)

You need to be logged in to comment on this article: log in or sign up.

Read next

Playing with blurs and filters on presentation cards with CSS

Looking for a way to display your latest blog posts or projects in a modern, animated way? These cards will go perfectly with your website! Let's find out how to make them.

December 9, 2024

Creating an animated list with CSS

Let's find out how to create an animated hover list!

December 9, 2024

Creating a cascading animation on text

For a slogan or for an animation on a very important page of your project, this very modern effect is also very easy to achieve. Let's take a look at how to do it in this article.

December 9, 2024

Create a map displaying links on mouse-over with CSS

To present your team or simply yourself, this animation will allow you to display the links to your social networks when you hover over the map: a striking effect guaranteed! Let's find out how to do it together.

December 9, 2024

Make an arrow that expands when hovered over with CSS

Whether it's to make your users want to see your project, read your article or access a page on your website, presenting your link with an arrow will make it easier to catch your visitors' eye! Let's find out in this article how to animate this arrow to enhance your readers' experience.

December 9, 2024

Create an image slideshow

Let's discover together how to create a simple and effective image slideshow using HTML, CSS and JavaScript!

December 6, 2024

Create an animated 3D button using CSS

In this article, we'll find out how to create a three-dimensional button that will add a touch of softness and perspective to your projects!

December 9, 2024

Creating circled buttons on hover with HTML and CSS

For a menu or to encourage your readers to share your website, share buttons are essential elements to add to your website. Let's find out how to make them more modern with a "neon" effect that will surround the icon selected by your user.

December 9, 2024

Become the solopreneur you dream of being.

First project, career change, business launch: access our courses, practice on real-world cases, and move forward with clear guidance.