问题
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
回答1:
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.
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.
来源:https://stackoverflow.com/questions/15583390/document-body-doesnt-exist-modernizr-hyphens-test-needs-it