diff --git a/packages/tabs/index.less b/packages/tabs/index.less index 225cb24b..cd01d78d 100644 --- a/packages/tabs/index.less +++ b/packages/tabs/index.less @@ -95,7 +95,7 @@ &--animated { display: flex; - transition-property: transform; + transition-property: left; } } diff --git a/packages/tabs/index.wxs b/packages/tabs/index.wxs index 87b553f5..60c48fd4 100644 --- a/packages/tabs/index.wxs +++ b/packages/tabs/index.wxs @@ -68,10 +68,14 @@ function trackStyle(data) { } return [ - 'transform: translate3d(' + -100 * data.currentIndex + '%, 0, 0)', - '-webkit-transition-duration: ' + data.duration + 's', - 'transition-duration: ' + data.duration + 's', - ].join(';'); + ['left', -100 * data.currentIndex + '%'], + ['-webkit-transition-duration', data.duration + 's'], + ['transition-duration: ', data.duration + 's'], + ] + .map(function (item) { + return item.join(':'); + }) + .join(';'); } function lineStyle(data) {