1 手机端页面a button input去除点击效果以及闪屏问题 添加:
a, button, input { -webkit-tap-highlight-color: rgba(255, 0, 0, 0); }
2 使用border创建小三角形
span { height: 0px; width: 0px; border-top: 5px solid #006633; border-left: 5px solid transparent; border-right: 5px solid transparent; }
3 去除点击效果
outline:none;
background:none;
box-shadow:none;
4 移动端和pc端使用不同页面,判断设备是pc端还是移动端,并进行链接的切换跳转
window.onload = function() { function isPC() { var userAgentInfo = navigator.userAgent; var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"]; var flag = true; for(var v = 0; v < Agents.length; v++) { if(userAgentInfo.indexOf(Agents[v]) > 0) { flag = false; break; } } return flag; } if(!isPC()) { window.location.href = "home.html"; } }