混合开发APP:在IOS上给伪元素content: ‘\2714’修改样式无效

<input type=”radio” />元素在Chrome上的效果,如下

 

Android上显示也正常,但是在IOS上,中间的勾是灰黑色的,如下:

 

 

实现代码如下:

input[type=radio] {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  line-height: 0.4rem;
  vertical-align:middle;
  margin-top: 0;
  -webkit-appearance: none;
}
input[type="radio"]::before,
input[type="radio"]:checked::before {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  line-height: 0.4rem;
  text-align: center;
  display: block;
  color: #fff;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
}
input[type="radio"]::before {
  background: #fff;
  border: 1px solid #EFEFEF;
}
input[type="radio"]:checked::before {
  background-color: @mainColor;
  content: '\2714\fe0e';
  color: #fff!important;
  border: 1px solid @mainColor;
  font-size: 0.186rem;
}

︎ 变体选择符-15

U(Unicode)+\FE0E

posted @ 2021-02-01 10:04  Gust_Lq  阅读(271)  评论(0编辑  收藏  举报