CSS - Multiple text-decorations with style and color

前端 未结 4 1775
悲哀的现实
悲哀的现实 2021-01-19 18:14

I want to make a text with red wavy underline and blue dashed overline using text-decoration.
This is my code: (working only in Mo

4条回答
  •  [愿得一人]
    2021-01-19 18:18

    Try This:

    span {
        position: relative;
        text-decoration: underline wavy red;
        border-top: 2px dashed blue;
    }
     Some Text 

    Aswer your comment is here:

    span {
        position: relative;
        text-decoration: underline wavy red;
    }
    
    span:after {
        position: absolute;
        width: 100%;
        height: 100%;
        display: block;
        content: '';
        border-top: 2px solid blue;
        top: 10px;
    }
     Some Text 

提交回复
热议问题