vue 深度作用选择器

使用 scoped 后,父组件的样式将不会渗透到子组件中

如果想在使用scoped,不污染全局的情况下,依然可以修改子组件样式,可以使用深度作用选择器

.tree{
    width: 100%;
    float: left;
    margin: 0 10px;
  }
  /deep/.tree .el-tree-node__content{
    padding: 3px 2px;
    margin-right: 40px;
  }

vue官网:https://vue-loader.vuejs.org/guide/scoped-css.html#deep-selectors

posted @ 2019-06-05 14:02  hellojinjin123  阅读(2101)  评论(0)    收藏  举报