这篇翻译不完整。请帮忙从英语翻译这篇文章

这是一个实验中的功能
此功能某些浏览器尚在开发中,请参考浏览器兼容性表格以得到在不同浏览器中适合使用的前缀。由于该功能对应的标准文档可能被重新修订,所以在未来版本的浏览器中该功能的语法和行为可能随之改变。

:blank CSS 伪类选择器 用于匹配如下节点

1. 没有子节点;

2. 仅有空的文本节点;

3. 仅有空白符的文本节点.

语法

:blank

样例

HTML

<div> </div>

CSS

div {
  border: 4px solid red;
}

:blank {
  border-color: lime;
}

结果

规范

Specification Status Comment
Selectors Level 4
:blank
Working Draft Initial definition

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Experimental
Chrome No support NoEdge No support NoFirefox Full support Yes
Notes Alternate Name
Full support Yes
Notes Alternate Name
Notes See bug 1106296.
Alternate Name Uses the non-standard name: :-moz-only-whitespace
IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android Full support Yes
Notes Alternate Name
Full support Yes
Notes Alternate Name
Notes See bug 1106296.
Alternate Name Uses the non-standard name: :-moz-only-whitespace
Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.
Uses a non-standard name.
Uses a non-standard name.

参考

文档标签和贡献者

此页面的贡献者: LoveofRedMoon
最后编辑者: LoveofRedMoon,