由于某种原因,vue同时删除了样式属性和背景图像。这个标签
<section style="background:
url(images/banners/profiles/profile-banner-1.png);" class="profile-banner flex items-end md:items-end md:justify-center p-8">
</section>当我重新加载页面时,背景图像会闪烁,然后被移除。
我把我所有的组件都注释掉了,似乎是Vue根实例。
const app = new Vue({
el: '#app',
/*data() {
return {
modal: false,
content_type: ''
}
},
methods: {
openModal: function(content_type){
this.modal = !this.modal;
}
} */
}); 更奇怪的是,它似乎只是与背景: url属性有问题,因为当我使用这样的东西时,它的工作非常好:
<section style="background: black;" class="profile-banner flex items-end md:items-end md:justify-center p-8">
</section>我想知道这是个bug,还是Vue预订了url?
也许是因为:url()?
如果是这样,我怎样才能逃过这一劫?
发布于 2018-07-09 07:04:23
style属性不应该有任何换行符。这工作得很好
<section style="background: url(images/banners/profiles/profile-banner-1.png);" .../>演示:
https://stackoverflow.com/questions/51239610
复制相似问题