简体   繁体   English

如何找到从哪里冒出来的element.style的根本原因?

[英]How to find root cause of element.style that came out of nowhere?

Ok, I have NO idea how this happened. 好的,我不知道这是怎么发生的。

This is how my HTML code SHOULD look like: 这是我的HTML代码应如下所示:

  <nav class="navbar navbar-inverse navbar-fixed-top">

This is what Chrome is showing me: 这是Chrome向我显示的内容:

 <nav class="navbar navbar-inverse navbar-fixed-top" datasqstyle="{&quot;bottom&quot;:null}" datasquuid="2b7a4e8b-dd51-451e-b4ad-c25d7a088886" datasqbottom="40" style="bottom: 0px;">

Not sure where all that extra code came from. 不知道所有这些额外的代码是从哪里来的。 The only javascript I was editing was on a different page on the site. 我唯一正在编辑的javascript是在网站的其他页面上。 Wasn't even on the index page and I know it did not affect the entire site because the code was in the body of the site, not the footer or header. 甚至不在索引页上,我知道它不会影响整个站点,因为代码位于站点的正文中,而不是页脚或页眉中。

 style="bottom: 0px;"

came out of nowhere and it changes from 0px to a different value as I scroll up and down. 冒出来,当我上下滚动时,它从0px变为另一个值。

https://collegeconnect.ph https://collegeconnect.ph

You will see what's wrong (it's the nav menu taking up the whole site). 您将看到问题所在(这是导航菜单占用了整个站点)。

Not sure what file is making the nav code go crazy. 不确定哪个文件使导航代码变得疯狂。 Everything was working fine until I checked the site on my mobile phone (android), realized the mobile menu button was not appearing properly (the nav menu itself was ok), then I went to chrome and turned on the mobile simulator and it started acting weird. 一切正常,直到我在手机(android)上检查了网站,意识到移动菜单按钮未正确显示(导航菜单本身正常),然后我转到chrome并打开了移动模拟器,它开始起作用奇怪的。

I had a similar issue with datasq* tags showing up in the code unexpectedly. 我也有类似的问题,datasq *标签意外出现在代码中。 The datasq* tags disappeared when I closed the SEOQuake toolbar for the page. 当我关闭页面的SEOQuake工具栏时,datasq *标签消失了。 Hope this helps someone. 希望这对某人有帮助。

Remove bottom 0px !important from .container-fluid .navbar class style in your custom.css custom.css卸下底部0像素!.container流体.navbar类样式重要

.container-fluid .navbar { bottom: 0px !importtant; .container-fluid .navbar { bottom: 0px !importtant; }

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM