Colouring a specific character through CSS

后端 未结 5 1523
生来不讨喜
生来不讨喜 2021-01-27 03:17

What I am after is to colour in just one character of my code throughout the page.

The lines between each of the words are what I would like to be a different colour fro

5条回答
  •  一整个雨季
    2021-01-27 03:59

    Another solution would be encapsulating the text (not the separators) inside s, and use :after pseudo-element to create the separator.

    Then, specify that, for the last element, the separator is not required:

    HTML

    Anti-virus End Point Disk Encryption UTM Email and Web Security

    CSS

    .separator > span:not(:nth-last-child(1)):after {
        content: ' | ';
        color:#00FF00;
    }
    

    Demo: http://jsfiddle.net/j9kZS/1/

提交回复
热议问题