How to color specific word in a container using CSS

后端 未结 14 1691
不思量自难忘°
不思量自难忘° 2020-12-15 05:01

Suppose I have a container:

 
This is a red apple

How to color a word \"red\" with red color? Some

14条回答
  •  时光取名叫无心
    2020-12-15 05:57

    You should use the span tag to surround the word "red"

    This is a red apple

    Then select this span using

    #container span {
        color: red;
    }
    

提交回复
热议问题