Home>

◎ Question content

I want to put a thick line decoration in the center of the background of the characters as shown in this image.

text-decoration: line-through;

I thought I could implement it with, but I couldn't because it was a strikethrough.

I investigated other implementation methods, but only underlined implementations.

I would appreciate it if you could tell me how to implement a thick line decoration in the center of the background of the characters as shown in this image.

  • Answer # 1

    Good evening.

    Why don't you try the method of adding a gradation to the background?

    sample

    p {
        background-image: linear-gradient (transparent 33%, pink 33%, pink 66%, transparent 66%);
    }