SSENSE/vue-carousel

Question: How can I have two carousels on one page?

Ouverte

#123 ouverte le 1 févr. 2018

 (11 commentaires) (0 réaction) (0 personne assignée)JavaScript (513 forks)batch import
help wantedquestion

Métriques du dépôt

Stars
 (1 705 étoiles)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

I have two Vue-Carousel components,

  1. A 'Portfolio' images component with arrows left & right.
  2. And a 'Quotes' component that shows quotes I like.

I can get the Portfolio images component working correctly no problem, but the Quotes component is massively wide. It appears to be some weird css flexbox issue. The flex-basis is way too wide: "flex-basis: 2932px". <div class="VueCarousel-inner" style="transform: translateX(0px); transition: transform 0.5s ease; flex-basis: 2932px; visibility: visible;">

On my Portfolio component, which is good, I have: <slide><img src="x.png"></slide>

And then:

img {
      width: 100% !important;
      height: auto !important;
      background-size: cover !important;
    }

So I am at a loss... I'm a bit of a noob but it seems like the JS is not calculating the math correctly?? No idea really. Please help.

*Using latest versions of everything.

Guide contributeur