gpt4 book ai didi

html - html5中no-js类是什么意思

转载 作者:太空狗 更新时间:2023-10-29 13:20:28 25 4
gpt4 key购买 nike

我看到很多网站都有针对 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]-->

我好像 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">

任何人都可以告诉我这些代码有什么用

最佳答案

这是 Moderniz 的说明。如果您的浏览器启用了 JavaScript,Modernizr 会将 no-js 更改为 js 类,因此您可以为启用 JavaScript 的浏览器和禁用 JavaScript 的浏览器定义 CSS 样式

关于html - html5中no-js类是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12635044/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com