HTML 5 - 偷偷摸摸的东西
HTML 5 是 W3C 对 HTML 的新定义,随着人们寻找下一个杀手级应用程序,它很可能代表互联网的发展方向。
有很多广为人知的“公共”编码功能,例如 标签,但我想知道到目前为止人们发现了哪些低级编码技巧,这些技巧可能是重要的、有用的、有趣的或上述所有的。
到目前为止我遇到的一些示例:
控制数据传输的拖放事件 - 例如:
document.addEventListener("dragstart", function(event)
{
event.dataTransfer.setData("image/png", slides.imageRep());
event.dataTransfer.setData("slides", slides.serializedRep());
// etc.
}, false)
通过 < 扩展的 2 维和 3 维图形code>
上下文感知 html 块
(作为奖励 -
< /code> 表意文字标签
,我不确定这是否是新的,但 标签 - 这些动态可更新的标签将使网络体验更丰富。
有人玩过这些并发现了一些有趣的例子吗?也许一些演示代码?
HTML 5 is the new W3C definition for HTML and will likely represent the direction the internet goes as people find the next killer apps that work in it.
There are the much publicized 'public' coding features like the <video>
tag, but I'm wondering what low-level coding tricks people have found so far that could be important, useful, interesting or all of the above.
Some examples I've come across thus far:
Drag-and-drop events that control data transfer - eg:
document.addEventListener("dragstart", function(event)
{
event.dataTransfer.setData("image/png", slides.imageRep());
event.dataTransfer.setData("slides", slides.serializedRep());
// etc.
}, false)
2-dimensional and 3-dimensional graphics through extension of the <canvas>
element.
Context-aware html blocks
(as a bonus - the obselecense of the <applet>
and <marquee>
tags - woohoo!)
<ruby>
tag for ideographs
and I'm not sure if this is new, but the <progress>
tag - these dynamically updateable tags are going to make the web a richer experience.
Anyone played with these and found some interesting examples of them put together? Some demo code perhaps?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Chrome Experiments 上有很好的示例,
从“关于”页面:
There are nice samples on Chrome Experiments
From the about page:
查看来自 Mozilla Labs 的 Bespin - 它是一个完全用 JavaScript 编写的代码编辑器,使用 Canvas。
另外,它本身可能不是“示例”,而是 Mozilla 上的 Canvas 教程开发人员中心很好地介绍了
元素。
Check out Bespin, from Mozilla Labs - it is a code editor written entirely in JavaScript, using Canvas.
Also, it may not be a "sample" per se, but the Canvas Tutorial on the Mozilla Developer Center is a very good introduction to the
<canvas />
element.