Change last letter color

后端 未结 8 1536
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 16:42

Example code:

string

I want to change the color on the last letter, in this case \"g\", but I need soluti

8条回答
  •  春和景丽
    2020-11-27 17:10

    Use ::after pseudo-element combined with attr() function:

    p::after {
        content: attr(data-end) ;
        color: red ;
    }
    

    Strin

    p::after {
      content: attr(data-end) ;
      color: red ;
    }

    Strin

提交回复
热议问题