vue中私有样式(scoped)中修改其他组件的样式

1、使用">>>"符号更改其他组件的样式

  例如

    <style lang="stylus" scoped>
      .a >>> .b 
        /*样式*/
     </style>
2、当lang = less or sass 时 解析不了">>>"符号,则使用 /deep/

     例如

    <style lang="less" scoped>
      .a /deep/ .b {
        /*样式*/
       }
     </style>
3、.vue界面中使用两个style标签 ,一个加scoped,一个不加
  

 例如

    <style lang="less">  

    </style>
    <style lang="less" scoped>
      
     </style>
posted @ 2018-07-09 18:22  小小07  阅读(3748)  评论(0编辑  收藏  举报