作者yukang (发不完的gmail)
看板Web_Design
标题[心得] 让 IE 和 Firefox 看到不同 css 属性
时间Tue Jul 25 23:57:25 2006
目前使用的方法是把属性前加上底线,加上後就只有 IE 读的到 _属
性,而且和原先的属性是一样的意思,但是 firefox 却是完全无法
解读,所以会略过该项设定。这样可以让网页更符合标准化,并且让
firefox & IE 都可以正常显示。
example:
#toc {
margin: -5px 0 15px 0;/* firefox 将会使用这一行设定*/
_margin:0px;/* IE 将会使用这一行设定*/
}
要不然也可以使用下列的第三个方法,分别撰写二个不同的 css 档,
他将会使用 java script 动态载入。
参考文件:
[1] How to hide CSS from buggy browsers
http://w3development.de/css/hide_css_from_browsers
[2] Will the browser apply the rule(s)?
http://centricle.com/ref/css/filters/
[3] CSS Browser Selector
http://rafael.adm.br/css_browser_selector/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.114.69.222
1F:推 alpe:唉... ... IE... ... 07/26 00:06