GWT:如何移除 Canvas Widget 的焦点指示器? [英] GWT: How do I remove the focus indicator of a Canvas Widget?
本文介绍了GWT:如何移除 Canvas Widget 的焦点指示器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下方法创建了一个画布:
I have created a Canvas using:
Canvas canvas = Canvas.createIfSupported();
并通过以下方式将其添加到 DOM:
and added it to the DOM via:
RootPanel.get("canvasContainer").add(canvas);
当我在 Chrome 中打开页面并单击它时,它会以橙色焦点边框突出显示.在 Android 浏览器中,当触摸画布时,整个画布会以半透明的蓝色叠加层以及纯蓝色边框突出显示,就好像画布被选中一样.
When I open up the page in Chrome and click it, it highlights with an orange focus border. In the Android browser, when touching the canvas, the entire canvas is highlighted with a semitransparent blue overlay, as well as a solid blue border, as if the canvas was selected.
如何更改此行为,以便在单击/触摸时不会以任何方式突出显示画布?
How do I change this behavior, so that the canvas isn't highlighted in any way when clicked/touched?
推荐答案
添加
canvas {
outline: none;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0); /* mobile webkit */
}
到你的画布标签 CSS 中.
into your canvas tag CSS.
这篇关于GWT:如何移除 Canvas Widget 的焦点指示器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文