label styling for single character

前端 未结 2 1953
南旧
南旧 2021-01-25 00:12

I need to change the color of one character in this label specifically the *.
This will need to be changed for several sections, but not changed for many others

2条回答
  •  温柔的废话
    2021-01-25 00:39

    You should be able to wrap the character in tags and set the colour in CSS. I'm not familiar with struct markup, but you should be able to apply the same concept. If not, this article will be helpful to use the and tags to accomplish what you want.

    Try this:

    HTML:

    CSS:

    span.diff-color {
        color: red;
    }
    

    That will set the color of all span elements with class name "diff-color" to red.

    Example.

提交回复
热议问题