Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现他们中的许多人建议避免使用 canvas 标签来实现 html5 中的文本编辑选项。但我找不到此“作者应避免使用画布元素实现文本编辑控件”的替代选项。谁能告诉我同样的替代解决方案。
提前致谢。
使用父级相对定位<canvas>并将您的 HTML UI 逻辑放在画布顶部。
<canvas>
例子:
在 HTML5 画布上添加按钮和控件
它本身不是替代解决方案,而是唯一明智的方法。