Hiding an element that contains only spaces using CSS

前端 未结 9 524
不思量自难忘°
不思量自难忘° 2021-01-07 17:34

I am trying to hide the following element in an automatically generated HTML document:

  

9条回答
  •  自闭症患者
    2021-01-07 18:15

    Answer: Not yet, but it's drafted.

    https://drafts.csswg.org/selectors-4/#the-blank-pseudo

    ...and —at least for Mozilla— there's already a prefixed implementation... :-moz-only-whitespace:

    http://jsfiddle.net/peayLrv3/

提交回复
热议问题