标签:nbsp temp code 样式 red css color span div
当我们用v-html渲染页面的时候会发现样式并没有添加上,如下
1 <template> 2 <div > 3 <div v-html="some_html" class="box" ></div>
4 </div>
5 </template>
6 <style scoped>
7 .box p{ color: red; }
8 </style>
解决办法:在写样式的时候添加 >>> 如下所示
1 .box >>> p { color: red; }
标签:nbsp temp code 样式 red css color span div
原文地址:https://www.cnblogs.com/niuxiaoxian/p/9443873.html