Nodewebkit app: hide cursor

无人久伴 提交于 2019-12-06 06:49:55

问题


I'm developing my web app with nodewebkit in fullscreen mode.
It has to be used with touchscreen monitor.

I've used CSS proprerty:

html * {
  cursor: none;
}

In nodewebkit's manifest seems that nothing usefull is provided to remove cursor..

Problem is that cursor disappears only when it is moved the first time.

How can I improve this behavior?


回答1:


I've fixed the problem calling from script:

document.body.style.cursor = 'none';

But I can't understand why doesn't work from css.




回答2:


I think maybe you need to focus window at first to make the css hiding cursor work?!

I meet the same issue and then have gone with the following code.

var gui = require("nw.gui");
var win = gui.Window.get();
win.focus();


来源:https://stackoverflow.com/questions/23936567/nodewebkit-app-hide-cursor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!