head.js:奇怪的负 html 边距?
也许你们中的一些人已经有一些使用 head.js
的经验。 我是首次使用的用户,遇到了一些问题:当我尝试加载多个 javascript 文件时,我的 标记就会出现
style="margin-left : -32767px;"
应用。
<script type="text/javascript">
var path = "<?php bloginfo('template_directory'); ?>";
head.js( path + "/js/jquery-1.5.min.js", path + "/js/css3-mediaqueries.js",
path + "/js/jquery-cookie.js", path + "/js/scripts.js", function() { });
</script>
知道为什么会发生这种情况吗?当我用 Firebug 摆脱 html 中奇怪的样式属性时,所有 javascript 库都工作得很好。然而,当页面加载时,内容会闪烁,并且一旦应用了负边距,我的页面上就绝对看不到任何内容。
Maybe some of you have already some experience with using head.js
.
I'm a first-time user and I'm having some problems: as soon as I try to load multiple javascript files my <html>
tag get a style="margin-left: -32767px;"
applied.
<script type="text/javascript">
var path = "<?php bloginfo('template_directory'); ?>";
head.js( path + "/js/jquery-1.5.min.js", path + "/js/css3-mediaqueries.js",
path + "/js/jquery-cookie.js", path + "/js/scripts.js", function() { });
</script>
Any idea why that happens? When I get rid of that weird style attribute in my html with Firebug all javascript libraries work just fine. However when the page loads the content flickers and as soon as this negative margin gets applied absolutely nothing is visible on my page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
负边距来自 css3-mediaqueries.js
代码是:
我不知道这有什么目的,但你可能可以毫无问题地删除它,如果你不想这样做,那么我会在上面应用样式html 标签
或 JS:
The negative margin is coming from css3-mediaqueries.js
the code is:
I don't know what purpose this has but you could probably delete this without a problem, if you don't want to do that then I would apply a style on the html tag
or with JS: