什么是HTML5画布? [英] What is the HTML5 canvas?
问题描述
我对HTML5画布有点困惑。我被告知它是JavaScript,但它似乎是一个更大的交易?
I'm a little confused to what HTML5 canvas is. I've been told it is JavaScript, but it seems to be a much bigger deal?
-
是什么让它与javascript不同?
What makes it different than javascript?
为什么这么棒?
除了JavaScript之外还做其他事吗?
Does it do other things than JavaScript?
推荐答案
我建议你阅读这篇文章 HTML5画布 - 基础知识
I suggest you read this article HTML5 Canvas - the basics
但简而言之。它不会取代javascript。
But in short. It does not replace javascript.
HTML 5 canvas 为您提供了一个简单且
的强大方式使用
JavaScript绘制图形。对于每个画布元素
,您可以使用上下文(想想绘图板中的
页面),
可以向其发出JavaScript命令以绘制
您想要的任何内容。浏览器可以
实现多个画布上下文,
不同的API提供绘图
功能。
HTML 5 canvas gives you an easy and powerful way to draw graphics using JavaScript. For each canvas element you can use a "context" (think about a page in a drawing pad), into which you can issue JavaScript commands to draw anything you want. Browsers can implement multiple canvas contexts and the different APIs provide the drawing functionality.
这篇关于什么是HTML5画布?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!