Modify the style of the child component in the vue parent component

1. Use global styles

< style > 
/* Global styles */ 
</ style >

< style scoped > 
/* local styles */ 
</ style >

2. To use the depth-action selector, it must be supported by vue-loader (above 11.2.0)

/*a is the top-level class of the child component*/

<style scoped>
.a >>> .b {
  /* ... */
}
or
.a /deep/ .b {
  /* ... */
}
</style>

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325305617&siteId=291194637