What is the HTML5 canvas?(什么是 HTML5 画布?)
问题描述
我对 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 Canvas - 基础
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 画布?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:什么是 HTML5 画布?
基础教程推荐
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
- Bokeh Div文本对齐 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
