欧美日韩国产一区二区|qovd片|小明个人发布看看|小浪货你夹真紧水又多|老头把我添高潮了A片故|99热久久精品国产一区二区|久久久春色AV

IE6IE7IE8 css中使用if條件在各大瀏覽器中hack方法解決教程

【IE6IE7IE8 css中使用if條件在各大瀏覽器中hack方法解決教程】一個(gè)滾動(dòng)代碼,其他瀏覽器都滾的好好的,就IE出現(xiàn)錯(cuò)誤!氣憤!隨想起IE的條件語句,如果是IE用第一種滾動(dòng)方式,如果是其他瀏覽器用另外一種方式;

復(fù)制代碼代碼如下:
!--[if IE]
script type="text/javascript"
new Marquee("ygjy1",0,2,395,300,50,0,0)
new Marquee("jbhc1",0,2,395,300,50,0,0)
/script
![endif]--

其他瀏覽器:

復(fù)制代碼代碼如下:
!--[if !IE]
script type="text/javascript"
new Marquee("ygjy1",0,3,395,303,20,4000,3000,101);
new Marquee("jbhc1",1,3,395,303,20,4000,3000,101);
/script
!--![endif]--

1、Css if hack條件語法
!--[if IE] Only IE ![endif]--
僅所有的WIN系統(tǒng)自帶IE可識別
!--[if IE 5.0] Only IE 5.0 ![endif]--
只有IE5.0可以識別
!--[if gt IE 5.0] Only IE 5.0![endif]--
IE5.0包換IE5.5都可以識別
!--[if lt IE 6] Only IE 6- ![endif]--
僅IE6可識別
!--[if gte IE 6] Only IE 6/![endif]--
IE6以及IE6以下的IE5.x都可識別
!--[if lte IE 7] Only IE 7/- ![endif]--
僅IE7可識別
!--[if gte IE 7] Only IE 7/![endif]--
IE7以及IE7以下的IE6、IE5.x都可識別
!--[if IE 8] Only IE 8/- ![endif]--
僅IE8可識別
2、DIV CSS實(shí)例教程
CSS實(shí)例一:
讓IE6-IE8顯示不同的內(nèi)容,DIV CSS代碼如下:

復(fù)制代碼代碼如下:
!DOCTYPE html
html
head
meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
titleDIV IF條件實(shí)例WWW.DIVCSS5.COM實(shí)例/title
/head
body
你正在使用:
!--[if IE 7]
h2IE7/h2
![endif]--
!--[if IE 6]
h2IE6/h2
![endif]--
!--[if IE 8]
h2IE8/h2
![endif]--


strongDIVCSS5說明/strong:如果你的瀏覽器版本為多少即會顯示IE多少,針對IE6-IE8實(shí)驗(yàn)CSS教程
/body
/html

說明:以上針對不同IE顯示不同網(wǎng)頁內(nèi)容DIV CSS實(shí)例實(shí)驗(yàn)
DIV CSS實(shí)例二:
讓IE6-IE8顯示不同CSS樣式效果 , DIV CSS代碼如下:

復(fù)制代碼代碼如下:
!DOCTYPE html
html
head
meta http-equiv="Content-Type" content="text/html; charset=utf-8" /
titleCSS IF條件hack實(shí)例 www.divcss5.com/title
!--[if IE 6]
style type="text/css"
.divcss5{ color:#F00;}
/style
![endif]--
!--[if IE 7]
style type="text/css"
.divcss5{ color:#FF0;}
/style
![endif]--
!--[if IE 8]
style type="text/css"
.divcss5{ color:#00F;}
/style
![endif]--
/head
body
div class="divcss5"
DIV CSS實(shí)驗(yàn)提示:

我在IE6下是紅顏色,在IE7下是黃顏色,在IE8下是藍(lán)顏色
/div
/body
/html

說明:以上實(shí)驗(yàn)僅實(shí)驗(yàn)IE6-IE8下if HACK
3、div css if條件hack小結(jié)
如需更多的衍生需要,大家可通過DIVCSS5小小實(shí)驗(yàn)擴(kuò)展,得到自己需要 。以上CSS if條件 HACK實(shí)驗(yàn)希望對你有幫助 , 需要拷貝以上代碼自己實(shí)際實(shí)踐以便掌握為我所用只目的 。

相關(guān)經(jīng)驗(yàn)推薦