In vuejs: how does style dynamically bind background-img add toggle animation?

background picture of timing switching div implemented by my settimeout

<div class="blur1x" :style="{backgroundImage: "url(" + currentImg[currentImgIndex - 1] + ")"}"

I want to add transition animation when switching. Ask the boss for advice.

Mar.30,2021

first of all, background image replacement is not supported for css3 animation

if you want to achieve an effect similar to fade-in and fade-out gradients, you need to change the dom structure. Use as many div as there are pictures, fix them together with absolute positioning, and then use z-index and opacity to achieve animation

.

it is suggested that you can directly achieve your goal by using the Swipe component of the ui framework. If you do not use the ui framework, many


suggest using background-position to control the writing of the broadcast graph, so you can use background to dynamically switch


you can use v-show+vue to transition animation, so you can achieve

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37d5c-2ae0c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37d5c-2ae0c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?