Use of “text-decoration-color” is not working

前端 未结 4 2133
清歌不尽
清歌不尽 2021-01-02 15:47

I want to color the text decoration. I got a tutorial from w3schools

And tried this

text-decoration: underline;
text-decoration-color: #ffffdffffd;
         


        
4条回答
  •  不知归路
    2021-01-02 16:35

    text-decoration-color has minimal browser support

    Instead, you can use something like a span to re-colour your text:

    p {
      color: red;  /* colour of underline */
      text-decoration: underline;
    }
    
    span {
      color: black; /* original colour of p */
    }

    underline is red, text is black

提交回复
热议问题