为什么在vue组件中设置CSS样式显示不出来
<template>
<div class="header">
div>
template>
<script>
export delete{};
script>
<style scoped>
div {
width: 10px;
width: 10px;
background-color: aqua;
}
style>
你给设置个height 看看 。审查元素看看样式加上了没
样式中你没有给高度,也没有内容把它撑起来
因为你的高度是0,所以这个盒子不显示,设置上高度就好了