我看到很多网站都有ie6,ie7,ie8的特定代码.
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"> <!--<![endif]-->
Run Code Online (Sandbox Code Playgroud)
而我似乎html有这样的特定类
<html class=" js no-flexbox flexbox-legacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms csstransforms3d csstransitions fontface generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths">
Run Code Online (Sandbox Code Playgroud)
任何人只是告诉这个代码有什么用
Aut*_*oxy 10
这是Moderniz的指示.如果启用了浏览器中的JavaScript,则Modernizr将更no-js
改为js
类,因此您可以为启用JavaScript的浏览器和禁用JavaScript的浏览器定义CSS样式
它放在那里,以便在出现IS支持JavaScript,那么你可以使用JS删除no-js
类.
no-js
如果您的网站通常需要JS才能正常运行,则可以使用该类为您的网页设置CSS样式.这提供了一种降级但功能性的格式,如果你想提供足够的HTML和足够的表单来使页面在没有JS的情况下工作,那么随后隐藏贫民窟版本并用闪亮和花哨的东西替换它.
归档时间: |
|
查看次数: |
17015 次 |
最近记录: |