question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slider Mode slideshow

See original GitHub issue

Hi there, Was using GlideJS as it has a feature i loved, the peek values. And then i came across a requirement on a second slider for my website where i need the slideshow effect. I’ve tried just a simple slider with

var sliderVideo = new Glide('.glide', {
  type: 'slideshow'
})

sliderVideo.mount()

and nothing different was achieved.

I expected the slideshow (fade) effect but instead got the regular carousel mode. I got glide.min.js, glide.core.css and glide.theme.css all set.

Can you please give me some directions?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

17reactions
eballestecommented, Nov 21, 2019

here is an improved implementation to @eiranix’s solution, where, like in his solution, you stack all slides on top of each other but instead of using position: absolute you use a 1x1 css grid and assign all slides to that same template area. this way you get no weird cropping issues when content is not equal in height

.glide__slides { 
  transform:none !important; 
  width:auto !important;
  display: grid; 
  grid-template-areas: 'slide';  //create a 1x1 grid where the single cell is called slide
}
.glide__slide {
  position: relative; 
  opacity: 0; 
  transition: opacity 0.5s ease; 
  grid-area: slide;  //assign all child slides to the cell
}
.glide__slide--active {
  z-index:1; 
  opacity:1;
}

css-grids is the future

14reactions
eiranixcommented, Feb 28, 2019

One way to get a fade type effect is to use some CSS overrides:

 .glide__slides {transform:none !important; width:auto !important; display:block;}
 .glide__slide {position:absolute; left:0; top:0; opacity:0; transition:opacity 1s;}
 .glide__slide:first-child {position:relative;}
 .glide__slide--active {z-index:1; opacity:1;}

This assumes all slides are the same height or less than the first one. If they aren’t you’d need to set the height with js to the tallest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create a Slideshow - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >
Slider settings - Slides
The Slides tab is located at the Slider settings page. Slides Design Slide background image fill The fill mode decides how your images...
Read more >
Use Presenter View in PowerPoint - Microsoft Support
PowerPoint Presenter View shows you the current slide, the next slide, and your speaker notes, to help you focus while presenting and connect...
Read more >
PowerPoint 2016: Presenting Your Slide Show - GCFGlobal
Here, you can access the same slide options you would find in normal presentation mode, including the Pen Tools and See All Slides...
Read more >
Slider | Webflow University
Adding background images to slides · Select a slide and create a class · Add a background image · Set the background image...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found