[英]Color in HTML table not taken into account
我在以下URL上使用HTML表格: https : //www.pascaldegut.com/pages/prestation-webdesign ,帶有紅叉和綠色標記。
它在台式機上運行良好,但是使用我的iPhone(Safari)時,叉號和格子是黑色
這是我使用的代碼示例
<table class="blueTable" border="1" cellpadding="0" cellspacing="0" rules="all" frames="border" style="width: 100%;">
<thead>
<tr>
<th style="width: 40%;">Services</th>
<th style="width: 20%;">Basique</th>
<th style="width: 20%;">PREMIUM</th>
<th style="width: 20%;">GOLD</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text">Audit & CR Vidéo</td>
<td class="check" style="color: #006600">✔</td>
<td class="check" style="color: #006600">✔</td>
<td class="check" style="color: #006600">✔</td>
</tr>
<tr>
<td class="text">Design Page Accueil</td>
<td class="check" style="color: #006600">✔</td>
<td class="check" style="color: #006600">✔</td>
<td class="check" style="color: #006600">✔</td>
</tr>
</tbody>
</table>
而且,我嘗試用此代碼強制CSS,但未成功
td.cross {
color: FF0000 !important;
}
td.check {
color: 006600 !important;
}
這里有什么主意嗎? 我無法解決問題,因為我無法從桌面上的編輯器復制問題
在此先感謝您:) Pascal
這與使用Unicode字符✖
和✔
。 我能夠檢查iPhone上的元素,這似乎是由iPhone Safari預先定義了所用字符的樣式和顏色引起的。 通過簡單地將它們更改為字體,例如Font Awesome ,您將能夠實現所需的功能。
我認為Safari找不到采用以下公式的顏色:#006600
將其更改為以下格式: style="color: rgb(0,102,0)"
<table class="blueTable" border="1" cellpadding="0" cellspacing="0" rules="all" frames="border" style="width: 100%;"> <thead> <tr> <th style="width: 40%;">Services</th> <th style="width: 20%;">Basique</th> <th style="width: 20%;">PREMIUM</th> <th style="width: 20%;">GOLD</th> </tr> </thead> <tbody> <tr> <td class="text">Audit & CR Vidéo</td> <td class="check" style="color: rgb(0,102,0)">✔</td> <td class="check" style="color: rgb(0,102,0)">✔</td> <td class="check" style="color: rgb(0,102,0)">✔</td> </tr> <tr> <td class="text">Design Page Accueil</td> <td class="check" style="color: rgb(0,102,0)">✔</td> <td class="check" style="color: rgb(0,102,0)">✔</td> <td class="check" style="color: rgb(0,102,0)">✔</td> </tr> </tbody> </table>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.