Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - In vue, the value of the backgroundPosition is reassigned in the: style of the v-for loop.
In vue, the value of the backgroundPosition is reassigned in the: style of the v-for loop.
You can use random number functions, such as

:style="{

Background location:

( 100/demo list . length * index)+' % '+

(math . random()*( 100- 100/demo list . length *(index+ 1))+( 100/demo list . length * index))+' % '

}"

As for how to generate a reasonable random number, you have to try and choose it yourself slowly. The above example is just a demonstration.