Bulma – Card

Bulma card

In this guide, we will discuss Card in Bulma.

Description

Card component displays the content in a box for better appearance. It consists of the following inner elements inside the main container −

  • card − It is a main container, that contains all the elements.
  • card-header − It represents a horizontal bar.
  • card-header-title − In this class, text is left-aligned with bold font.
  • card-header-icon − It is used for displaying header icon
  • card-image − It specifies fullwidth container for making responsive image.
  • card-content − It is used for displaying content for the card.
  • card-footer − It defines footer of the card with horizontal list of controls.
  • card-footer-item − It is used within card-footer class and has repeatable list item.

The below example demonstrates usage of above classes to display a card −

<!DOCTYPE html>
<html>
   <head>
      <meta charset = "utf-8">
      <meta name = "viewport" content = "width = device-width, initial-scale = 1">
      <title>Card</title>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.1/css/bulma.min.css">
      <script defer src = "https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>
      <script defer src = "https://use.fontawesome.com/releases/v5.1.0/js/all.js"></script>
   </head>

   <body>  
      <div class = "container">
         <h1 class = "is-size-2">Card</h1><br>
         <div class = "card">
            <div class = "card-image">
               <figure class = "image is-3by1">
                  <img src = "http://3.bp.blogspot.com/-B8jn4_pTmko/Vi3zmDIhnII/AAAAAAAACBY/5EEv6Ep_z6w/s1600/adglob.png" alt="Placeholder image">
               </figure>
            </div>
            <div class = "card-content">
               <div class = "media">
                  <div class = "media-left">
                     <figure class = "image is-48x48">
                        <img src = "https://lh3.ggpht.com/FnKKlX-4e6SZjODG0_9TMd5FZ7zuO_OOh7lbRgqB8DxWTZVUiALW6qh3YUT6xARYdZQ=w720-h310" alt="Placeholder image">
                     </figure>
                  </div>
                  <div class = "media-content">
                     <p class = "title is-4">Adglob</p>
                     <p class = "subtitle is-6">https://adglob.in/</p>
                     <time datetime = "2016-1-1">11:09 PM - 1 Jan 2016</time>
                  </div>
               </div>          
            </div>
            
         </div>
      </div> 
      
   </body>
</html>

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply