FIX CSS <!--[if lt IE 8]> in IE

2019-02-02 02:53发布

How to i can use this

    <!--[if lt IE 8]>
    <style type='text/css'>
  #header ul#h-menu li a{font-weight:normal!important}
    </style>
    <![endif]-->

if i remove <!--[if lt IE 8]><![endif]--> Above code 'll run good in IE 8 but if i dont it dont run. Help me with fixed IE, if i want in above code in all IE version,.

i want code #header ul#h-menu li a{font-weight:normal!important} run only in IE

8条回答
劳资没心,怎么记你
2楼-- · 2019-02-02 03:53
<!--[if lt IE 8]><![endif]-->

The lt in the above statement means less than, so 'if less than IE 8'.

For all versions of IE you can just use

<!--[if IE]><![endif]-->

or for all versions above ie 6 for example.

<!--[if gt IE 6]><![endif]-->

Where gt is 'greater than'

If you would like to write specific styles for versions below and including IE8 you can write

<!--[if lte IE 8]><![endif]-->

where lte is 'less than and equal' to

查看更多
冷血范
3楼-- · 2019-02-02 03:55
    <!--[if IE]>
    <style type='text/css'>
    #header ul#h-menu li a{font-weight:normal!important}
    </style>
    <![endif]-->

will apply that style in all versions of IE.

查看更多
登录 后发表回答