How to Remove CSS line-through

前端 未结 1 670
星月不相逢
星月不相逢 2021-01-12 07:26

I am trying to remove the text-decoration:line-through; style applied to my element and I cannot seem to be able to do so. I have tried text-decoration:no

1条回答
  •  执笔经年
    2021-01-12 07:31

    I know I can always re-write my HTML so the elements that require a line-through has their own class. I'm wondering if there is an alternative other then restructuring my HTML.

    Not really. The behavior you see is totally by design; ancestors will always propagate their text decorations to certain descendants, and conversely you can't affect an ancestor's text decoration from within a descendant.

    There isn't a very viable alternative to restructuring, currently, although text-decoration-skip from the upcoming CSS3 text decoration module looks promising.

    0 讨论(0)
提交回复
热议问题