开发者

html5 canvas game on mobilesafari darkening on tap

开发者 https://www.devze.com 2023-02-12 19:40 出处:网络
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开发者_如何

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

精彩评论

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