VueJS v-bind: style for background-image: url ()
According to VueJS docs:
<div v-bind:style="{ color: activeColor, fontSize: fontSize + 'px' }"></div>
I tried several templates:
<div v-bind:style="{ background-image: url(item.img), }"></div> <div v-bind:style="{ 'background-image': url('item.img'), }"></div> <div v-bind:style='{ backgroundImage: "url(item.img)", }'></div> But the results are invalid for the HTML style attribute.
Any ideas?
+5