How to remove string that dosn't have an html tag using CSS

后端 未结 5 1029
无人及你
无人及你 2021-01-17 23:09

I need to remove strings that do not have an html tag.

For example :

5条回答
  •  被撕碎了的回忆
    2021-01-17 23:28

    You can not do this with pure css. If you cannot change the markup, then you will need to use JS to grab the content you want to keep and remove the rest.

    If you have any control over the markup you should really consider using different markup. You could have an alternate element that is initially hidden.

    keep this and i want to remove this

    you could also enclose the other content you want to remove in a span tag and give it a class that you can reference later.

    keep this and i want to remove this

提交回复
热议问题