CSS Scoping说
The descendants of a 07001 must not generate Boxes in the
@H_403_7@
formatting tree. Instead,the contents of the 07002
generate Boxes as if they were the contents of the element instead.CSS Pseudo-Elements描述:: before和:: after as
these pseudo-elements generate Boxes as if they were immediate
@H_403_7@
children of their originating element那么哪些是真的?
>首先,shadow主机的所有内容(不包括:: before和:: after)由活动阴影树的内容替换。然后,:: before和:: after生成阴影主机中的框。
>首先,:: before和:: after在shadow主机中生成框。然后,影子主机的所有内容(包括:: before和:: after)由活动阴影树的内容替换。Firefox和Chrome做的前者,但规范描述的行为?
var root = document.querySelector('div').createShadowRoot(); root.innerHTML = "<p>Shadow content</p>";div::before,div::after { content: 'Generated content'; }<div>Content</div>