admin管理员组文章数量:1306170
I'm building a website at the moment, where I need the use of Modernizr, but for some reason it doesn't apply the classes to the html-tag as it should..
My code looks like this:
<!doctype html>
<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="en"><![endif]-->
<!--[if IE 7]><html class="no-js ie7 oldie" lang="en"><![endif]-->
<!--[if IE 8]><html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<script src=".js"></script>
</head>
Anyone that knows how to get it working?
Best regards,
I'm building a website at the moment, where I need the use of Modernizr, but for some reason it doesn't apply the classes to the html-tag as it should..
My code looks like this:
<!doctype html>
<!--[if lt IE 7]><html class="no-js ie6 oldie" lang="en"><![endif]-->
<!--[if IE 7]><html class="no-js ie7 oldie" lang="en"><![endif]-->
<!--[if IE 8]><html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<script src="http://cdn.hosting4real./js/modernizr/modernizr.js"></script>
</head>
Anyone that knows how to get it working?
Best regards,
Share Improve this question asked Oct 20, 2011 at 11:36 LucasRolffLucasRolff 1,2983 gold badges11 silver badges21 bronze badges 2- What classes is it failing to apply? How are you determining that it is not doing so? What browsers are you testing in? – Quentin Commented Oct 20, 2011 at 11:38
- It doesn't apply any classes at all, only the no-js, I'm testing it in 'view source' in chrome, safari, and opera – LucasRolff Commented Oct 20, 2011 at 11:48
1 Answer
Reset to default 10View source shows (unsurprisingly) the source code for the page. It doesn't show a live view of the current state of the DOM. If you want that, use a DOM viewer (you'll find one built into most browsers and via the Firebug plugin for Firefox).
本文标签: javascriptModernizr not applying classes to htmltagStack Overflow
版权声明:本文标题:javascript - Modernizr not applying classes to html-tag - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741817160a2399144.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论