javascript - vue的style绑定不支持background-image吗?
黄舟
黄舟 2017-04-11 10:48:19
0
2
617
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
伊谢尔伦

我这边是正常的,你看看有没有设置p的宽高

新回答:

data () {
    return {
        img: require('你的json资源路径')
    }
}

:style="{backgroundImage: 'url(' + img + ')'}"
迷茫

拼接错了吧 v-bind:style="{backgroundImage:'url('+todo.pic+')'}"

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!