[英]How to remove a strange border in css
I was trying to make a [border, but there is always a strange border appear under it, I was try to see what happened and I found there is a "shadow root" and there is a strange div there but I cant remove it, can someone help me?我试图制作一个 [边框,但它下面总是出现一个奇怪的边框,我试着看看发生了什么,我发现有一个“影子根”,那里有一个奇怪的 div 但我无法删除它,有人能帮我吗? thanks谢谢
Picture of the strange border appearing:出现怪边的图片:
I found a strange div and shadow root here (I don't write this div and shadow root)我在这里发现了一个奇怪的div和shadow root(我不写这个div和shadow root)
Picture of the strange div:奇怪div的图片:
I'm not having trouble understanding your question, but it would be better if you provide some code with index.html also!我在理解您的问题时没有问题,但是如果您也提供一些带有 index.html 的代码会更好!
The main thing as far as I see, that you need to try write styles in CSS code using classes or id instead of a simple tag element.据我所知,主要的事情是,您需要尝试使用类或 id 而不是简单的标签元素在 CSS 代码中编写 styles。 Just try to code in that way to fix that problem只需尝试以这种方式编写代码来解决该问题
.myDiv{
/* your styles here */
}
instead of代替
div{
/* your code here */
}
your index.html must look as follows您的 index.html 必须如下所示
<div class="myDiv"></div>
class, which referred to div you want to be edited class,指要编辑的div
I had the same problem and it is due to the Chrome extension Scrnli.我有同样的问题,这是由于 Chrome 扩展 Scrnli。 Disable it and you will see how that border disappears.禁用它,您将看到该边框如何消失。 In my case I do not uninstall it because it is quite useful and free, but there is some kind of conflict in the iframe that it generates.就我而言,我没有卸载它,因为它非常有用且免费,但它生成的 iframe 中存在某种冲突。
I hope I have been of help to someone with the same problem.我希望我对遇到同样问题的人有所帮助。
Regards.问候。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.