Ayhamalahmad / Ayhamalahmad-task-one-cards-ex

Home Page:https://ayhamalahmad.github.io/Ayhamalahmad-task-one-cards-ex/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Card Carousel

This is a simple card carousel built using HTML, CSS, and JavaScript. The carousel displays a collection of cards, and it automatically switches the "active" class among the cards at regular intervals. When a card is clicked, it becomes the active card, and the previously active card loses the "active" class.

Card Carousel

How to Use

  1. Access the Card Carousel Demo to view the live demo.

  2. The carousel starts automatically and cycles through the cards every 9 seconds.

  3. Click on any card to make it the active card. The active card will be highlighted with a different background color.

Technologies Used

  • HTML
  • CSS
  • JavaScript

Development

The carousel is created using simple HTML for the card structure and CSS for basic styling, including the active card appearance.

In JavaScript, we handle the following functionalities:

  • When a card is clicked, the "active" class is added to the clicked card and removed from the previously active card.

  • We use the setInterval function to move the "active" class to the next card every 3 seconds.

Contact

For any questions or feedback regarding this carousel, you can contact me through my GitHub profile.

About

https://ayhamalahmad.github.io/Ayhamalahmad-task-one-cards-ex/


Languages

Language:CSS 50.2%Language:JavaScript 29.2%Language:HTML 20.6%