css - 前端 iphone 下的bug
本文介绍了css - 前端 iphone 下的bug的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
碰到一个很奇怪的问题:块级元素下有两个内联元素,给一个设bgc后,在iPhone下,另一个也会有bgc。
html
<div class="test">
<span class='tel'> 400-800-8246</span>
<a class='text' href='tel:4008008246'>立即咨询</a>
</div>
scss
.test{
margin-top: 100px;
background-color: steelblue;
span{
color: red;
}
a{
color: #f00;
background-color: #fff;
}
}
效果
解决方案
iphone自动识别长串数字转换为a标签类型,解决办法加meta标签 telephone=no
<meta content="telphone=no">
这篇关于css - 前端 iphone 下的bug的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文