From 65c64ce93580dd05c4fed50496443324d8c5e63e Mon Sep 17 00:00:00 2001 From: Rijn Date: Mon, 16 Jan 2017 04:00:52 -0600 Subject: [PATCH] carousel basic position --- src/components/carousel/carousel-item.vue | 20 ++++++++++++++++++-- src/components/carousel/carousel.vue | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- src/styles/components/carousel.less | 26 ++++++++++++++++++++++++++ test/routers/carousel.vue | 2 +- 4 files changed, 155 insertions(+), 4 deletions(-) diff --git a/src/components/carousel/carousel-item.vue b/src/components/carousel/carousel-item.vue index b995e94..ea964c6 100644 --- a/src/components/carousel/carousel-item.vue +++ b/src/components/carousel/carousel-item.vue @@ -1,10 +1,26 @@ diff --git a/src/components/carousel/carousel.vue b/src/components/carousel/carousel.vue index 680cd56..e048061 100644 --- a/src/components/carousel/carousel.vue +++ b/src/components/carousel/carousel.vue @@ -1,10 +1,18 @@ diff --git a/src/styles/components/carousel.less b/src/styles/components/carousel.less index b440717..87557dc 100644 --- a/src/styles/components/carousel.less +++ b/src/styles/components/carousel.less @@ -8,4 +8,30 @@ user-select: none; touch-action: pan-y; -webkit-tap-highlight-color: transparent; + + &-track, &-list { + transform: translate3d(0, 0, 0); + } + + &-list { + position: relative; + display: block; + overflow: hidden; + + margin: 0; + padding: 0; + } + + &-track { + position: relative; + top: 0; + left: 0; + display: block; + } + + &-item { + float: left; + height: 100%; + min-height: 1px; + } } diff --git a/test/routers/carousel.vue b/test/routers/carousel.vue index 4dff775..ff9bab6 100644 --- a/test/routers/carousel.vue +++ b/test/routers/carousel.vue @@ -1,5 +1,5 @@