I am trying to enhance the style of HTML code using a v-html
but have been struggling with finding a working solution so far. Can anyone help me out? :(
Below is my code snippet:
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;
}
Any assistance would be greatly appreciated! Thanks in advance!