Adding hover selectors to HTML elements is a good way to engage and prompt the user with very minimal code. Adding a shadow or transition when a user hovers over a card or button can let them know the that element is clickable.

But there are endless ways to create hovers so how to you decide which one to add to your site?

We decided to create a list of some PenCode user-submitted Bootstrap card hovers to help you get started.

Links are provided to the actual code along with the author’s profile page.

Enjoy!

Using Bootstrap CDN

<!DOCTYPE html>
<html>
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Title</title>
    <!--Bootstrap CSS-->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <!--Custom CSS-->
    <link rel="stylesheet" href="{% static 'css/stylesheet.css'%}" type="text/css">
  </head>
  <body>

    ...

    <!-- Optional Javascript -->
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
  </body>
</html>

Before you can add CSS to a Bootstrap card, you need to connect your project to the Bootstrap CSS framework. To use Bootstrap components, you can add the Bootstrap CDNs to your project’s element and elements. The CSS link goes in the while the optional JavaScript is placed right before the closing tags.

With those few lines of code, you are ready to use Bootstrap and more importantly Bootstrap cards and CSS declarations.

#bootstrap #css

12 Bootstrap Card Hover Effects (With Source Code!)
14.95 GEEK