开发者

on an iPhone web application: how do I disable the rectangle that appears around a DIV when a user touches and holds it?

开发者 https://www.devze.com 2022-12-17 17:30 出处:网络
I\'ve tried setting -webkit-user-select: none and selectstart An开发者_运维知识库d it did remove the selector, but a rectangle still appears..If you mean the rectangle that appears on a link w

I've tried setting

-webkit-user-select: none

and

selectstart

An开发者_运维知识库d it did remove the selector, but a rectangle still appears..


If you mean the rectangle that appears on a link when you click it, then you can use this css rule to define the color and alpha of the rectangle. Use an alpha value of 0 to make it invisible:

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


In your CSS for the DIV, try using the outline property.

div.no-border {
    outline: none;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消