<div id="box" style="width:100px;height:100px;"
:style="{backgroundImage: 'url('+'http://i2.s2.dpfile.com/pc/833992a42d3393b06396ad47684624d0(278x200)/thumb.jpg'+')'}"
></div>
请问这样写有什么问题吗,绑定失败了,在dom上没有这个style属性
<div id="box" style="width:100px;height:100px;"
:style="{backgroundImage: 'url('+'http://i2.s2.dpfile.com/pc/833992a42d3393b06396ad47684624d0(278x200)/thumb.jpg'+')'}"
></div>
请问这样写有什么问题吗,绑定失败了,在dom上没有这个style属性
11 回答1.3k 阅读
4 回答573 阅读✓ 已解决
3 回答860 阅读
1 回答858 阅读✓ 已解决
1 回答1.1k 阅读
2 回答775 阅读
2 回答622 阅读
已定位到问题所在,链接有()会和css的url()冲突,需要再用一层引号将其包住