Skip to content

Commit 87565f5

Browse files
committed
Add slide overlay info to readme
1 parent 7159bce commit 87565f5

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ But even with all its features, the slider I was using before didn’t do exactl
2525
- [Usage](#usage)
2626
- [Basic Setup](#basic-setup)
2727
- [Slide Backgrounds](#slide-backgrounds)
28+
- [Slide Overlays](#slide-overlays)
2829
- [Image Slides](#image-slides)
2930
- [Auto Width Image Slides](#auto-width-image-slides)
3031
- [Full Width Image Slides](#full-width-image-slides)
@@ -136,6 +137,30 @@ as long as it's a valid CSS `transform` value.
136137
</div>
137138
```
138139

140+
### Slide Overlays
141+
To add a color overlay on top of the background image, wrap your slide content in a `<div>` with the `slide-overlay` class.
142+
143+
```html
144+
<div class="slider slide-full-width">
145+
146+
<a href="#" class="slider-prev">&langle;</a>
147+
<a href="#" class="slider-next">&rangle;</a>
148+
149+
<div class="slider-viewport">
150+
<div class="slider-track">
151+
152+
<div class="slide" data-background="path/to/bg-image.jpg">
153+
<div class="slide-overlay">
154+
<!-- Slide Content -->
155+
</div>
156+
</div>
157+
158+
</div>
159+
</div>
160+
161+
</div>
162+
```
163+
139164
### Image Slides
140165
Image slides have specific markup and default styling out of the box.
141166
The only thing you might want to hook up yourself is any lightbox you prefer.

0 commit comments

Comments
 (0)