diff --git a/src/components/carousel/carousel.vue b/src/components/carousel/carousel.vue index ad8fd0ac..aebb2895 100644 --- a/src/components/carousel/carousel.vue +++ b/src/components/carousel/carousel.vue @@ -113,10 +113,13 @@ ]; }, trackStyles () { + // #6076 + const visibleStyle = this.trackIndex === -1 ? 'hidden' : 'visible'; return { width: `${this.trackWidth}px`, transform: `translate3d(${-this.trackOffset}px, 0px, 0px)`, - transition: `transform 500ms ${this.easing}` + transition: `transform 500ms ${this.easing}`, + visibility : visibleStyle }; }, copyTrackStyles () { @@ -125,7 +128,7 @@ transform: `translate3d(${-this.trackCopyOffset}px, 0px, 0px)`, transition: `transform 500ms ${this.easing}`, position: 'absolute', - top: 0 + // top: 0 }; }, arrowClasses () { diff --git a/src/styles/components/carousel.less b/src/styles/components/carousel.less index e8c69acf..9dfa1d3f 100644 --- a/src/styles/components/carousel.less +++ b/src/styles/components/carousel.less @@ -24,7 +24,8 @@ &-track { position: relative; - top: 0; + //top: 0; + top: 100%; left: 0; display: block; @@ -33,6 +34,7 @@ z-index: 1; &.higher { z-index: 2; + top: 0; } }