在另一臺服務器上託管的Client.css。在IE7中覆蓋
td { background: none transparent scroll repeat 0% 0%; }
我可以重寫這個IE7嗎?
我想刪除這個元素的背景屬性。背景強迫IE7中的所有內容在<tr>
和<td>
元素上不可見,因爲我不認爲它在IE7中允許這樣做。
在另一臺服務器上託管的Client.css。在IE7中覆蓋
td { background: none transparent scroll repeat 0% 0%; }
我可以重寫這個IE7嗎?
我想刪除這個元素的背景屬性。背景強迫IE7中的所有內容在<tr>
和<td>
元素上不可見,因爲我不認爲它在IE7中允許這樣做。
在我的樣式表我可以重寫特定的客戶端風格,定義特定的類,然後重寫客戶端風格的td。
<link type="text/css" rel="stylesheet" href="http://domain.com/client.css"/>
<link type="text/css" rel="stylesheet" href="mystyles.css"/>
我的鏈接的樣式表內
.class > td { background: #fff; }
對於IE7僅
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/client.css" />
<![endif]-->
對於IE 7和LOWER
<!--[if lt IE 8]>
<link rel="stylesheet" type="text/css" href="/client.css" />
<![endif]-->
不確定。您可以使用!important
規則和條件樣式:
在你<head>
,添加:
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="ie7.css">
<![endif]-->
然後裏面ie7.css
,只需在下面的CSS規則:
td { background: #fff !important; }
'TD {*背景:無重要; }' – Andy
我也在嘗試這樣做,而不必編輯客戶端鏈接的樣式表。我知道條件樣式表的東西,但當客戶端經常更改文件時無助。 – Blynn
所以你想要一個不改變文件的CSS解決方案?我很困惑。 – BenM