h5页面字体位置会跳动,
第一个截图是安卓手机屏幕,第二个图是iPad屏幕,
期望怎么让它固定在第一个截图一样
css样式如下:
.share {
width: 100%;
height: 100%;
background: url("./img/bg.png") no-repeat;
overflow: hidden;
background-size: 100% 100%;
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /*Webkit (non-standard naming)*/
image-rendering: crisp-edges;
-ms-interpolation-mode: nearest-neighbor;
position: relative;
}
.title {
position: absolute;
left: 50%;
bottom: 24%;
transform: translate(-50%, -50%);
width: 100%;
font-size: 1rem;
font-weight: 700;
color: #333;
text-align: center;
letter-spacing: 1px;
}
.btn {
width: 40%;
background: #fd4a08;
height: 36px;
display: flex;
align-items: center;
border-radius: 20px;
font-size: .16rem;
position: absolute;
left: 50%;
bottom: 15%;
transform: translate(-50%, -50%);
color: #fff;
}
.btn img {
width: 40px;
height: 20px;
padding-left: 14px;
}
.btn .app {
padding-left: 10px;
}
.btn .open {
padding-left: 3px;
}
btn的宽度去掉,用padding撑开盒子试试