![]() |
Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. One such useful component which is used in modern websites is the Card component. Basically, a Card contains a heading, an image, a description, and a footer. It is seen on numerous websites, for example, on news websites. Foundation CSS Card Classes:
Note: It is not needed to add all the sections when we are making a card. It solely depends on our needs for the website. Syntax: <div class=”card”> <div class= “card-divider”> ... </div> <img src= “...” > <div class= “card-section”> ... </div> </div> Example: HTML
Output: Adding images to Card: Images also work well with cards. We can spread an image to the edges by declaring the image within the .card class using the <img> tag. However, if we want to pad the image, we can use the card-section class. Example: In the below example, we have added the image inside the card-section class. HTML
Output: Sizing of Cards: We can also add custom CSS to size our cards by using the CSS width property. Example: In the below example, we have set the size of the two cards using the custom CSS. HTML
Output: We can also add multiple cards to our website using the Foundation Grid utilities. This allows to space out the cards nicely and make them responsive as well. Example: HTML
Output: |
Reffered: https://www.geeksforgeeks.org
CSS |
Related |
---|
![]() |
![]() |
|
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 8 |