background image transition working
This commit is contained in:
parent
be74441825
commit
8f34dc75d2
|
@ -2,7 +2,7 @@
|
|||
<div class="image-viewer"
|
||||
:class="{ 'is-visible': isVisible }">
|
||||
<transition name="trans-bg-image" mode="out-in">
|
||||
<div v-show="backgroundImageUrl" class="viewer-background" :style="backgroundStyle"></div>
|
||||
<div v-if="backgroundImageUrl" :key="backgroundImageUrl" class="viewer-background" :style="backgroundStyle"></div>
|
||||
</transition>
|
||||
<div class="image-container">
|
||||
<transition name="trans-bg-image">
|
||||
|
@ -221,20 +221,23 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
.trans-image-enter-active, .trans-image-leave-active {
|
||||
transition: opacity 5s;
|
||||
}
|
||||
.trans-image {
|
||||
&-enter-active, &-leave-active {
|
||||
transition: opacity .5s;
|
||||
}
|
||||
|
||||
.trans-image-enter, .trans-image-leave-to {
|
||||
&-enter, &-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.trans-bg-image {
|
||||
&-enter-active, &-leave-active {
|
||||
transition: opacity .3s;
|
||||
}
|
||||
|
||||
.trans-bg-image-enter-active, .trans-bg-image-leave-active {
|
||||
transition: opacity 1s;
|
||||
}
|
||||
|
||||
.trans-bg-image-enter, .trans-bg-image-leave-to {
|
||||
&-enter, &-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue