首页 文章

Vue正在使用样式属性删除背景图像

提问于
浏览
0

出于某种原因,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()

如果是这样,我怎么逃避这个?

1 回答

相关问题