在style中的scoped <style scoped></style>

在style中使用了scoped,则style标签里的css仅作用于当前页面。(如果要覆盖前端框架的css样式就不要使用scoped,这样自己写的css才能生效)

css对子组件不生效,可以在子组件的style标签里也使用scoped,

这样可以使一个页面对应自己的css,避免影响到其他页面。

posted @ 2020-11-02 15:39  小林不会飞  阅读(277)  评论(0编辑  收藏  举报