首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >不考虑HTML表中的颜色

不考虑HTML表中的颜色
EN

Stack Overflow用户
提问于 2018-07-26 06:01:45
回答 2查看 59关注 0票数 0

我在这个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

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-07-26 07:27:38

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

资源:Cross - Tick

以下是我的测试截图:

票数 2
EN

Stack Overflow用户

发布于 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>

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51528311

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档