vue v-html 加载渲染修改样式

在 vue 中使用 v-html 标签,渲染出来的内容会带有原来的页面标签和样式,想要修改内容中的样式该如何做?

直接在style中修改 会发现不起作用,可以用>>>来操作 直接上代码

<p v-html="good_info.detail" id="details_conntent" class="top20 content"> </p>
#details_conntent >>> img{
width: 100%;
}

猜你喜欢

转载自www.cnblogs.com/mqc-mumu/p/11547661.html