我在这个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
发布于 2018-07-26 07:27:38
这与unicode字符✖
和✔
的使用有关。我能够检查我的iPhone上的元素,这似乎是由于iPhone Safari预先定义了所使用的字符的样式和颜色造成的。通过简单地将它们更改为字体,例如Font Awesome,您将能够实现您想要的。
以下是我的测试截图:
发布于 2018-07-26 07:21:55
我认为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>
https://stackoverflow.com/questions/51528311
复制相似问题