Commentary
The carousel is a simple horizontal all CSS display bar for images. CSS grid is used to display these images; no javascript required. Nothing fancy, but can also be used for mobile devices.
The .carousel-wrapper
class defines the parent container section
element and sets up the grid.
A heading tag, visible only to screen readers, is required for a section
. The .carousel
class
controls the horizontal display of images. The .no-scrollbar
class is an optional modifier that hides
the bottom scrollbar.
The variable --carousel-image-height
sets the images height and --carousel-image-width
is
set to an aspect ratio of 4 x 3 (default). The images are set to cover the carousel image area and so the image
overflow will be hidden. This results in uniform image sizing.
Usage
Classes: | |
---|---|
.carousel-wrapper |
Defines a parent grid div . |
.carousel |
Main body of carousel that holds a ul list of images. |
.no-scrollbar |
Optional modifier that removes bottom scroll bar. |
Dependencies: | |
---|---|
File: | carousel.css |
Variables: | --bg-main-ter, --carousel-image-height, --carousel-image-widtht, --gutter, --mar-ver, --pad-horz ,--radius |