<!--[if lt IE 7 ]><html class=“ie ie6” lang=“en”> <![endif]-->

前端 未结 4 1312
孤街浪徒
孤街浪徒 2021-01-05 05:44
  1. What does this and other similar IE code lines mean in an HTML5 do

4条回答
  •  星月不相逢
    2021-01-05 06:24

    As @FDL pointed out, use a conditional stylesheet if you've got a moderate amount of styles to apply various versions of IE.

    For minimal positioning tweaks, I use html classes (like ie8 or ie9) and just drop the modifications into my master stylesheet.

    For example:

    .filter-bar .item { float: left; vertical-align: top; }
    .ie8 .filter-bar .item { position: relative; top: 2px; } /* fix a gap in IE8 */
    

提交回复
热议问题