小米浏览器,uc移动浏览器兼容问题

小米浏览器,uc移动浏览器兼容问题如图
图片描述
价格的¥在苹果和安卓其他浏览器都能垂直居中,把小米和uc设置垂直居中,在其他浏览器不垂直居中在小米和uc浏览器不居中偏下,怎么改让所有浏览器都居中

图片描述

css
.price{font-size:22px;color:#F79200;text-align:center;width:90px;margin:0 auto;height:30px;position:relative;padding-left:6px;}
.price .pricon{width:16px;height:16px;text-align:center;line-height:16px;border:1px solid #F79200;color:#F79200;-webkit-border-radius:50%;border-radius:50%;font-size:12px;/ /position:absolute;left:-5px;top:50%;transform:translateY(-50%);}

阅读 4.2k
1 个回答

HTML:

<div class='price'>
    <p>59800</p>
</div>

CSS:

.price {
    position: relative;
    height: 1.5em;
}
.price > p {
    font-size: 1.2em;
    color: #F79200;
    padding-left: 1.5em;
    font-weight: bold;
}
.price::before {
    content: '¥';
    display: block;
    position: absolute;
    left: 0;
    top: .3em;
    width: 1.5em;
    height: 1.5em;
    text-align: center;
    border: 1px solid #F79200;
    color: #F79200;
    border-radius: 50%;
    font-size: .8em;
}
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题