Hiding an element that contains only spaces using CSS

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

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

  

9条回答
  •  庸人自扰
    2021-01-07 17:50

    While not a standard, Firefox has ":-moz-only-whitespace".

    Also, for some "future proofing", css-tricks mentions a :blank selector that will be part of the CSS Selectors Level 4 draft. While no current browser supports it, it is a possibility.

提交回复
热议问题