关于前端:移动端奇葩问题

3次阅读

共计 844 个字符,预计需要花费 3 分钟才能阅读完成。

1、ios 中有长按能够关上链接性能,如果阻止 a 标签默认事件,不要把链接写到 href 里,长按还是能关上。
如果有须要做 feature AB 的状况,也不要把链接写在 a 标签的 href 中,否则点击能够阻止,然而长按还能够跳转。

2、字体色彩突变款式须要留神:

1)写在具体的须要突变文字的标签里,不能写在父级元素上,IOS 15.3 及以下零碎手机不反对,字体不会显示。如上面代码,须要把款式写在 never-text 和 never-fee 元素上,而不是写在父级元素 never-tip 上。2)须要写 color 款式做兼容,以便不反对该款式的设施也能够失常显示文字 
<div class="never-tip">
    <span class="never-text">You could save $260 throughout the year.</span>
    <span class="never-fee">Only € 19.99/year</span>
</div>
<style>
  color: #E0BB83;
  background: linear-gradient(135deg, #F4E1B3 0%, #DBB278 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
</style>
````
![款式没做兼容,有问题的状况](https://upload-images.jianshu.io/upload_images/24159983-1f1ecb47aa258b6a.jpg?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
![失常展现状况](https://upload-images.jianshu.io/upload_images/24159983-a818302fa6ea7786.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
正文完
 0