html5 canvas宽高,html5 canvas的宽高有大小限制吗?

我在stackoverflow找到答案了:

canvas的大小有限制,而且浏览器或者设备不同,其限制还不一样。

翻译:

截至2012年7月,Safari上第三代iPad最大6826像素高度的canvas。Internet Explorer 9的最大高度为8192像素。(我认为的最大宽度是相同的,但没有测试这个。)

超过最大宽度使得在Safari iPad上的画布无用,没有什么会被画出来。Internet Explorer 9仍将使用可用的8192像素,但不会超出范围的画。

我没有在其他浏览器测试特定的上限,但最新版本的Safari(Mac)和Safari,Chrome,Firefox(Windows)都允许至少8192像素。

原文:

As of July 2012, Safari on a 3rd generation iPad has a maximum canvas height of 6826 pixels. Internet Explorer 9 has a maximum height of 8192 pixels. (I assume the maximum widths are the same, but have not tested this.)

Exceeding the maximum width in Safari on iPad renders the canvas useless; nothing will draw. Internet Explorer 9 will still use the available 8192 pixels, but will not draw outside that range.

I have not tested for specific upper limits on other browsers, but the latest versions of Safari (Mac) and Safari, Chrome, and Firefox (Windows) all allow at least 8192 pixels.

摘自答案地址

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值