vue中私有樣式(scoped)中修改其餘組件的樣式

一、使用">>>"符號更改其餘組件的樣式vue

  例如sass

    <style lang="stylus" scoped>
      .a >>> .b 
        /*樣式*/
     </style>
二、當lang = less or sass 時 解析不了">>>"符號,則使用 /deep/

     例如less

    <style lang="less" scoped>
      .a /deep/ .b {
        /*樣式*/
       }
     </style>
三、.vue界面中使用兩個style標籤 ,一個加scoped,一個不加
  

 例如stylus

    <style lang="less">  樣式

    </style>
    <style lang="less" scoped>
      
     </style>
相關文章
相關標籤/搜索