I would like to add style to HTML code in a v-html
. I tried several solutions but nothing functional :(
Here is my code:
Template :
<div
class="para"
v-html="value"
/>
Script :
export default {
data () {
return {
value : "<h2> TITLE </h2> <p> PARA </p>"
}
},
}
Style :
.para >>> h2 {
color: blue;
}
.para >>> p {
color: red;
}
Thanks in advance !