gpt4 book ai didi

html - 为什么#shadow-root 在我的文档中,为什么它会覆盖我的 CSS

转载 作者:可可西里 更新时间:2023-11-01 13:01:09 24 4
gpt4 key购买 nike

首先,我看到了重复项

What is #shadow-root, and why does it put display none on my font awesome classes?

HTML / CSS - DIV Element hidden when it shouldn't be?

但是这两个都表明问题出在 adblock 上,我已经完全禁用了 adblock。

我更关心#shadow-root 的来源,因为我肯定没有把它放在那里。

我已经读到 chrome 中有一个选项可以禁用它(有趣的是我已经禁用了它......),但这意味着使用我的网站的任何人都需要做同样的事情,我宁愿只是完全取消它,因为它在我的应用程序中提供零有用性。

我还用谷歌搜索并阅读了很多关于影子 dom 的文章,但没有一篇文章能说明为什么它会无缘无故地出现。

从我在 inspector/view 页面源代码中看到的,我的应用程序的全部内容都被渲染到这个影子 dom 中,因此没有接收到我的任何样式。

我正在使用 rails、react、redux、react-redux、react-router

Chrome 开发者工具屏幕 enter image description here

页面源屏幕 enter image description here

请注意,源中的 div 中没有任何内容应呈现到 react。

附加信息:以正常和隐身方式在 chrome 上显示无样式的页面

在 safari 中根本不起作用

最佳答案

很多 chrome 插件会自动在你的 inspector 中创建这个 shadow root。例如,自从我下载了 Vimium,我在 chrome 中打开的任何页面的底部都有一个 shadowroot div。没什么好担心的。

关于html - 为什么#shadow-root 在我的文档中,为什么它会覆盖我的 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39112987/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com