gpt4 book ai didi

css - VUE 组件忽略 CSS

转载 作者:行者123 更新时间:2023-11-28 03:11:37 27 4
gpt4 key购买 nike

我有以下 VUE 组件:

<template>
<div>
<div class="bottom-footer">
{{msg}}
</div>
</div>
</template>

<script>
export default {
name: 'LayoutFooter',
data () {
return {
msg: 'my test'
}
},
mounted () {
}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.bottom-footer {
height: 200px;
background-color: #A7BFE8;
}
</scoped>

VUE 完全忽略了我的作用域 CSS。当页面呈现时,它根本没有应用。没有控制台错误。我尝试删除 scoped 属性,但它仍然被忽略。知道为什么 VUE 这样做吗?

最佳答案

<style scoped>
.bottom-footer {
height: 200px;
background-color: #A7BFE8;
}
</style>

你需要关闭样式

关于css - VUE 组件忽略 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45682348/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com