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