attribute width height:
canvas的宽高,在canvas上定位坐标等,是依据此宽高。
style width height :绘制的宽高,如果与上面宽高不等比,会出现拉伸压缩情况。可以理解为,style是对attribute进行了缩放操作。style是在屏幕上显示的大小。
最后
以上就是发嗲睫毛最近收集整理的关于h5 canvas 属性width height 与 style中的width height区别的全部内容,更多相关h5内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复