li:在内容之前:“✔";在某些移动设备上颜色不同 [英] li :before content: "✔ "; different color on some mobile devices

查看:143
本文介绍了li:在内容之前:“✔";在某些移动设备上颜色不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写CSS来改善li标签.

I write css to make li tags better.

笔记本电脑,我的手机(联想盛传1)和华硕zenfone 5一切都很好

Everything is ok on laptop and my mobile phone(lenovo vibe 1) and asus zenfone 5

但是当在Iphone 5和Galaxy Note3上进行测试时,我的颜色(rgb(240,230,140))显示为红色和黑色.

But when Itested on Iphone 5 and Galaxy Note3 my color (rgb(240, 230, 140)) shown as red and black.

我不知道CSS有什么问题.我应该使用图像代替CSS还是使用CSS解决方案? 谢谢.

I don't know what is wrong with my css. Should I use image istead of css or Is there a solution with css? Thanks.

这是我的CSS:

ul.anamenu li::before {
content: "✔ ";
color: rgb(240, 230, 140);
font-size: 4vmin;
text-indent: -2em;}

推荐答案

尝试在ul.anamenu li::before上添加font-family: 'Zapf Dingbats'.在iPhone上效果很好.

Try to add font-family: 'Zapf Dingbats' on ul.anamenu li::before. It works well on iPhone.

17年6月26日

存在此问题是因为该角色现在是Apple(和其他构造函数)绘制的表情符号.在 emojipedia 网站上,您可以看到此表情符号的一些变化. ,则渲染的字符是设备上的位图图像,而不是可以更改颜色的向量字形.实现表情符号的构造函数或平台可以自由设计自己想要的表情符号(如果需要,可以设计成黑色,红色,粉红色或其他颜色).因此,我们可能会误解一个表情符号的含义

JUN 26 '17

The issue exists because this character is now an emoji drawn by Apple (and other constructors). On emojipedia website, you can see some variations of this emoji.

So, your rendered character is a bitmap image on your device and not a vector glyph that you could change color. Constructors or platforms that implements emojis are free to design their own emojis as they want (with black, red, pink or other colors if they want). That's why we may misunderstanding the meaning of one emoji depending on the platform where we see it.

Unicode联盟目前设置了Unicode标准中的1,282个表情符号,该名称提供了一个名称,例如咧嘴笑脸"的U + 1F600,但严格来说并没有决定表情符号的外观.

There are currently 1,282 emoji in the Unicode standard, set by the Unicode Consortium, which provides a name, such as U+1F600 for 'grinning face,' but critically doesn't dictate what the emoji should look like.



要更改此字符的颜色,必须处理文本.因此,您可以在对勾标记后直接使用
版本选择器15 获取常规文本版本:✔︎(以HTML格式). 此处.

顺便说一句,关于重磅标记,您可以使用变化选择器content: "\2714 \fe0e";尝试此解决方案.如您所见,CSS中有 unicode符号: c4>和紧随其后的VARATION SELECTOR'\ fe0e'.



To change color of this character, you have to work on text. So, you can use a variation selector 15 directly after the check mark to get a regular text version: ✔︎ (in HTML). Some exemples for differents languages here.

By the way, concerning Heavy Check Mark, you can try this solution using variation selector content: "\2714 \fe0e";. As you see, there are unicode symbole in CSS: '\2714' and the VARATION SELECTOR '\fe0e' directly after.

.unicode:after{
  content: '\2714 \fe0e';
  color: red;
}

<div class="unicode">
</div>

这篇关于li:在内容之前:“✔";在某些移动设备上颜色不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆