背景 | ::backdrop
::backdrop
这是一种实验技术
由于该技术的规格不稳定,请查看各种浏览器的兼容性表格以供使用。另外请注意,随着规范的变化,实验技术的语法和行为在未来版本的浏览器中可能会发生变化。
::backdrop
CSS pseudo-element
是在呈现的任何元件下方立即呈现的框全屏模式(以上栈中的任何下的元素)。全屏元素是顶层图层的一部分,也就是说,它们被渲染在所有其他内容的前面。
dialog::backdrop {
background: rgba(255,0,0,.25
}
::backdrop
伪元素可以用来修改或隐藏所显示全屏的元素基础文档。
::backdrop
不从任何元素继承,也不继承任何元素。什么属性适用于这个元素没有限制。
规范
Specification | Status | Comment |
---|---|---|
Fullscreen APIThe definition of '::backdrop' in that specification. | Living Standard | Initial definition |
浏览器兼容性
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 32.0 webkit 37.0 | (Yes)ms | 47 (47) 1 | 11 ms | No support | No support |
on <dialog> | 32.0 webkit 37.0 | No support | No support | No support | No support | No support |
on fullscreen | No support | (Yes)ms | 47 (47) 1 | 11 ms | No support | No support |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | No support | (Yes)ms | 47.0 (47) 1 | No support | No support | No support |
on <dialog> | No support | No support | No support | No support | No support | No support |
on fullscreen | No support | (Yes)ms | 47.0 (47) 1 | No support | No support | No support |