移动端开发的那些坑

在移动设备上,点击input会出现默认的灰色背景,如何才能去掉它。默认的阴影会把一些尺寸给暴露出来,很难看。html

解决:web

-webkit-tap-highlight-color:rgba(0,0,0,0);
tap-highlight-color:rgba(0,0,0,0);

 2 “表单中的input[type="submit"]和input[type="reset"]按钮在iPhone的safari浏览器下圆角有一个bug”浏览器

解决:app

-webkit-appearance: none;

 

less

IOS移动端active不起做用:函数


[1] By default, Safari Mobile does not use the :active state unless there is a touchstart event handler on the relevant element or on the <body>.url


即在iOS系统的移动设备中,须要在按钮元素或body/html上绑定一个touchstart事件才能激活:active状态。 document.body.addEventListener( ' touchstart ' , function () {  // ...空函数便可}); 
相关文章
相关标签/搜索