css样式表的位置
1.内部样式表
放在head标签中
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
div{
background-color: blue;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.js"></script>
</head>
2.内联样式表(元素样式表)
<div style="color: red;">
账户:<input type="text" v-model="username"><br>
</div>
3.外部样式表(推荐使用)
将样式表写到独立的css中
<link rel="stylesheet" href="./index.css">
<div class="red-big-center">
账户:<input type="text" v-model="username"><br>
</div>
①可以解决多页面样式重复的问题
②有利于浏览器缓存,提高页面响应速度
③有利于代码分离,更容易阅读维护