开发者

html5 canvas game on mobilesafari darkening on tap

i am developing a html5-canvas game which runs fine on most browsers, even mobile.

though on safari mobile if you tap on the canvas, it gets slightly darker - like if you tap on any html el开发者_如何学Cement. i guess this is for selection purposes.

is there any way to disable this darkening?


I think what you're seeing is indeed the selection of the canvas object. You could try hiding the highlight colour by setting the alpha to 0.

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


There is a CSS rule you can use: -webkit-user-select: none;.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜