HTML5 canvas ignores width and height set in JavaScript (solved)
由 Vandersteene
2013年 06月 29日 03:33
English(英语)
4 回复
Hello,
I'm using a HTML5 canvas to draw on but everything is scaled to 150% and positioned at 150% of what is specified. For example, on the screen the canvas has size (450, 450) although in the JavaScript source the size is set to (300, 300).
Adding the viewport tag to the head tag in the index.html file solved the problem: meta name="viewport" content="width=480, height=800, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"
编辑者为: Brock Boland 开 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.
您必须登录才能使用此服务。立即登录?
The tag you entered already exists.
是否要将这篇帖子报告为垃圾邮件?
已将该帖报告为垃圾邮件。
cannot be empty.
是否确定要取消并返回列表?
The code has been copied to the clipboard.
输入标题。
所有分类
一般支持
Tizen .NET
Web 应用程序开发
本机应用程序开发
SDK 和 IDE
--------
--------