Html `[if lt IE 9]`中的`lt`是什么意思

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41430406/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 14:11:25  来源:igfitidea点击:

What is the meaning of `lt` in `[if lt IE 9]`

htmlcssconditional-comments

提问by Masayuki Suzuki

What is the meaning of ltin the following script?

lt以下脚本中的含义是什么?

<!--[if lt IE 9]>
  <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js">
  </script>
<![endif]-->

回答by Jon Uleis

That's an Internet Explorer conditional comment, which reads out "if using Internet Explorer less thanversion 9 (IE8 and lower), do this...".

这是一个 Internet Explorer条件注释,内容为“如果使用的 Internet Explorer低于版本 9(IE8 及更低版本),请执行此操作...”。

When the conditional passes, HTML5Shivis run in the browser.

当条件通过时,HTML5Shiv在浏览器中运行。

HTML5Shiv is a JavaScript workaround, created by Sjoerd Visscher, to enable styling of HTML5 elements in versions of Internet Explorer prior to version 9, which do not allow unknown elements to be styled without JavaScript.

HTML5Shiv 是一种 JavaScript 解决方法,由 Sjoerd Visscher 创建,用于在版本 9 之前的 Internet Explorer 版本中启用 HTML5 元素的样式,这不允许在没有 JavaScript 的情况下设置未知元素的样式。

回答by GKGeofferton

It means the same as "less than". A list of alternative comparison operators you might encounter follows:

与“小于”意思相同。您可能会遇到的替代比较运算符列表如下:

  • lt < (less than)
  • gt > (greater than)
  • eq == (equal to)
  • ne != (not equal to)
  • gte >= (greater than or equal to)
  • lte <= (less than or equal to)
  • lt <(小于)
  • gt >(大于)
  • eq ==(等于)
  • ne != (不等于)
  • gte >=(大于或等于)
  • lte <=(小于或等于)

(fixed less/greater or equal operators)

(固定小于/大于或等于运算符)