vue3 修改子组件样式
在style 使用scoped时,修改子组件样式,可以使用
1 2 3 4 5 6 7 8 9 10 |
# vue3中会有警告, .<class> >>> <子组件class> {} # 使用如下方式 :deep(.md h1) { margin: 30px 0 30px !important; } :deep(.md h2) { margin: 25px 0 25px !important; } :deep(.md h3) { margin: 20px 0 20px !important; } :deep(.md h4) { margin: 15px 0 15px !important; } :deep(.md h5) { margin: 10px 0 10px !important; } :deep(.md h6) { margin: 10px 0 10px !important; } |