Document.body不存在. Modernizr连字符测试需要它 [英] Document.body doesn't exist. Modernizr hyphens test needs it

查看:84
本文介绍了Document.body不存在. Modernizr连字符测试需要它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望我能解释造成此问题的原因.我搜索了,根本不知道.当我在项目之间移动此Foundations,Red等框架时,它倾向于遵循.任何建议都会有用.

I wish I could explain what's causing this issue. I've searched and simply have no idea. When I move this Foundations, Red, etc. framework between projects it tends to follow. Any advice would be useful.

http://goo.gl/HbTUL

推荐答案

您正在<head>中没有加载您的自定义Modernizr库(使用Hyphenator,这会导致问题).存在,因此出现错误.

You're loading your customized Modernizr lib (with Hyphenator, which is causing the problem) in <head>, at a moment where <body> doesn't exist yet, hence the error.

一个明显的解决方案是将Modernizr库的加载移至页面底部(在<body>内或之后),尽管建议这样做可能会导致一些问题.如果是这样,请尝试将Hyphenator与Modernizr库分开,然后分别加载.

An obvious solution would be to move the loading of the Modernizr lib to the bottom of your page (in or after <body>), although this suggests that doing that might cause some issues. If it does, try separating Hyphenator from the Modernizr lib and load it separately.

这篇关于Document.body不存在. Modernizr连字符测试需要它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆