0

折り返されたテキストの線の色を変更することはできますか? つまり、例えば、黒い文字と赤い線!?

ここに画像の説明を入力

4

2 に答える 2

2

次のように、いくつかの CSS トリックを実行できます。

    .line-through-text {
        position: relative;
        color: blue;
    }

    .line-through-text:before {
        border-bottom: 2px solid orange;
        position: absolute;
        content: "";
        width: 100%;
        height: 50%;
    }
<h2>
Hello There! <span class="line-through-text">This is wrong,</span> This is correct
</h2>

于 2016-04-17T20:22:42.280 に答える