🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
##点击链接就可以拨打电话,怎么办? < a href="tel:13666655546">咪咕阅读客服电话< /a > ##点击链接就可以发送短信,怎么办? < a href="sms:13666655546">咪咕阅读客服短信< /a > ##H5页面的数字不想识别为电话号码,怎么办? < meta name="format-detection"content="telephone=no" /> ##H5页面想忽略Android平台中对邮箱地址的识别,怎么办? < meta name="format-detection" content="email=no"/> ##不想显示webkit的滚动条,怎么办? element::-webkit-scrollbar{ display: none;} ##H5页面的内容想不被人选中,怎么办? -webkit-user-select: none;user-select: none; ##H5页面想禁止长按链接或长按图片后弹出菜单,怎么办? -webkit-touch-callout: none; ##想取消IOS里Button、Input上的默认样式,怎么办? -webkit-appearance: none; ##想在Android里H5页面touch时没有蓝色的边框与遮罩,怎么办? -webkit-tap-highlight-color:rgba(0,0,0,0); ##多张图片放置在一起,不想有4PX的空隙,怎么办? img{display:block}; img{float:left}; img{vertical-align:top} ##想改变Input里 placeholder属性的样式,怎么办? ::-webkit-input-placeholder{color:#ccc} ##H5页面input type=”num”时想去掉右边的上下箭头,怎么办? input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none !important; margin: 0;} ##H5页面加载的图片太大了,怎么办? JPG图片用JPEGmini压缩,PNG可在线用http://tinypng.org/压缩 ##在iOS系统中键盘输入时不想首字母为大写,怎么办? <input type="text" autocapitalize="off" /> ##在IOS系统中键盘输入关闭自动修正,怎么办? <input type="text" autocorrect="off" /> ##屏幕旋转横屏竖屏切换时,想禁止文本缩放,怎么办? -webkit-text-size-adjust: 100%; ##H5页面想有快速回弹滚动的效果,怎么办? overflow: auto; /* auto | scroll */ -webkit-overflow-scrolling: touch; ##屏幕旋转横屏竖屏切换时想支持有不同的事件,怎么办? 事件 window.orientation,取值:正负90表示横屏模式、0和180表现为竖屏模式; window.onorientationchange = function(){ switch(window.orientation){ case -90: case 90: alert("横屏:" + window.orientation); case 0: case 180: alert("竖屏:" + window.orientation); break; } } 样式 //竖屏时使用的样式 @media all and (orientation:portrait) { .css{} } //横屏时使用的样式 @media all and (orientation:landscape) { .css{} } ##在Android 上想不显示语音输入按钮,怎么办? input::-webkit-input-speech-button {display: none} ##想开发H5摇一摇功能,怎么办? HTML5 deviceMotion:封装了运动传感器数据的事件,可以获取手机运动状态下的运动加速度等数据。