判斷ie版本

剛好看到一個朋友分享,在IE沒死透之前都還會有機會用的到。

 lt:less than 當前指定版本以下,不包含當前版本
gt:greater than 當前指定版本以上,不包含當前版本
lte:less than or equal 當前指定版本以下,包含當前版本(等於)
gte:greater than or equal 當前指定版本以上,包含當前版本(等於)

EX:
<!--[if lte IE 8]>
<link rel="stylesheet" href="/css/ie8_only.css" type="text/css" />
<![endif]-->

if lte IE 8 : 如果版本為ie8或ie8以前版本...

留言