on an iPhone web application: how do I disable the rectangle that appears around a DIV when a user touches and holds it?
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;
}
精彩评论