We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
HTC 文件由
behavior
CSS 样式驱动。这是非标准的,仅适用于 IE,因此您将无法支持使用此方法的其他浏览器的用户。因此,我见过的几乎所有 HTC 行为文件都被实现为 hack,以使 IE 支持其他浏览器已经具备的某些或其他功能。
例如:
当谈到开发 HTC 文件时,实际上并没有那么多 - 它们基本上是标准的 Javascript,带有一个小的 XML 包装器。如果您可以在浏览器中编写 Javascript,那么您将能够编写 HTC 行为文件。缺点是您将无法使用任何外部 Javascript,因此无法使用 JQuery 或其他库。
问题是为什么?正如我所说,如果您想编写 IE hack,这是唯一有意义的用例。事实上,出于多种原因,您可能想要使用 HTC 做的所有其他事情都最好用简单的 Javascript 来实现。
HTC files are driven by the
behavior
CSS style. This is non-standard and only works in IE, so you won't be able to support users of other browsers using this method.Because of this, virtually all the HTC behavior files I've seen have been implemented as hacks to make IE support some or other feature which other browsers already have.
For example:
When it comes to developing HTC files, there's not actually that much to it - they're basically standard Javascript, with a small XML wrapper. If you can write Javascript in the browser, then you'll be able to write an HTC behavior file. The downside is that you won't be able to use any external Javascript, so no JQuery or other libraries.
The question is why? As I say, the only use-case that makes sense if you want to write an IE hack. Virtually everything else that you could want to use HTC for would be better implemented as straightforward Javascript, for any number of reasons.
这里有一些关于它们的资源:
http://www.w3.org/TR/NOTE-HTMLComponents
http://msdn.microsoft。 com/en-us/library/ms532146(v=vs.85).aspx
我不是 100% 确定你所说的“学习 HTML 组件”是什么意思,我认为这些就是你所追求的。
Well here are some resources on them:
http://www.w3.org/TR/NOTE-HTMLComponents
http://msdn.microsoft.com/en-us/library/ms532146(v=vs.85).aspx
I'm not 100% sure what you meant by "learning HTML Components", I assume those are what you are after.