Vuetify default carousel CSS selectors, for transition duration reduction

跟風遠走 提交于 2020-07-10 01:16:14

问题


I need a transition that does not produce the dreaded image blinking for a v-carousel-item. Ideally it's a smooth and quick fade that would work for both transition and reverse-transition. I have tried all the transitions built in to Vuetify as well as a couple of custom ones but nothing works. My issue can be seen CodePen of the issue and in a reported at GitHub Vuetify Issue.

<div id="app">
  <v-app>
    <v-carousel>
      <v-carousel-item
        v-for="(item,i) in items"
        :key="i"
        :src="item"
        reverse-transition="fade-transition"
        transition="fade-transition"
      ></v-carousel-item>
    </v-carousel>
  </v-app>
</div>

回答1:


Here is a CSS workaround for the currently open issue: https://github.com/vuetifyjs/vuetify/issues/10809#issuecomment-629468386

.v-carousel .v-window-item {
  position: absolute;
  top: 0;
  width: 100%;
}

Here is a codepen with the workaround, inside vertical v-tabs.



来源:https://stackoverflow.com/questions/62315211/vuetify-default-carousel-css-selectors-for-transition-duration-reduction

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!