html - 未考虑 HTML 表格中的颜色

标签 html css

我在此 URL 上使用 HTML 表格:https://www.pascaldegut.com/pages/prestation-webdesign ,带有红色十字和绿色勾号。

它在桌面上运行良好,但使用我的 iPhone (Safari) 时,十字和对勾是黑色的

enter image description here

这是我使用的代码示例

<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;
  }

有什么想法吗? 解决这个问题对我来说很棘手,因为我无法从我的桌面编辑器中复制这个问题

提前谢谢你:) 帕斯卡

最佳答案

这与 unicode 字符 的使用有关。我能够检查我的 iPhone 上的元素,这似乎是由 iPhone Safari 为使用的那些字符预定义的样式和颜色引起的。通过简单地将它们更改为字体,例如 Font Awesome ,你将能够实现你想要的。

资源:Cross - Tick

以下是我的测试截图: Inspect Element: using an <code>x</code> rather than what you've used previously

Screenshot of the result of the inspect element.

关于html - 未考虑 HTML 表格中的颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51528311/

相关文章:

javascript - 未捕获的类型错误 : Cannot read property 'style' of undefined when using for loop

javascript - HTML 表单提交问题

javascript - HTML 中的交叉合并表列和行

html - 跨度 :after 中的 FontAwesome

css - 如何使新的 Facebook 帖子嵌入功能响应?

jquery - 有没有办法让元素选择退出 CSS?

javascript - 在制作按钮的javascript循环中换行

html - 悬停在 slider 内的按钮上不起作用

html - 解析没有 HTML 标签的数据

ajax - 如何在不刷新页面的情况下将新的 HTML 数据从服务器推送到浏览器