Adding buttons and controls on HTML5 canvas

别来无恙 提交于 2019-12-10 23:29:14

问题


I'm using the three.js 3D engine. How can I add UI buttons on my WebGL canvas?


回答1:


Use CSS to absolute positioning HTML elements over <canvas>.

<canvas> is just like all other HTML elements and the same tricks work on it.

http://css-tricks.com/absolute-positioning-inside-relative-positioning/



来源:https://stackoverflow.com/questions/12343053/adding-buttons-and-controls-on-html5-canvas

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