宣布Web标准更新-Visual Studio 2010编辑器HTML5支持

Folks have been asking "When will VS2010 support HTML5?" I've been saying, jokingly, that the answer is "yesterday" as there's nothing keeping you from creating HTML5 in Visual Studio or ASP.NET today. However, there's no intellisense and there's lots of squiggly lines that make people uncomfortable. Combine all that with the fact that HTML5 is a moving target, and it's unclear. We've said before that the next version of Visual Studio will have better support HTML5, but what about today?

人们一直在问“ VS2010何时支持HTML5?” 我一直在开玩笑地说,答案是“昨天”,因为没有什么可以阻止您今天在Visual Studio或ASP.NET中创建HTML5。 但是,没有智能感知,而且有许多曲折的线条使人感到不适。 将所有这些与HTML5是一个可移动的目标这一事实结合起来,目前尚不清楚。 我们之前已经说过,Visual Studio的下一版本将更好地支持HTML5,但是今天呢?

Today, a rogue faction some folks on the Web Platform and Tools team, spearheaded by Mads Kristensen are all pleased to announce the Visual Studio Web Standards Update. This adds better support for HTML5, CSS3 and new JavaScript features to ALL versions of Visual Studio.

今天,由Mads Kristensen率领的Web平台和工具团队中的一些 流氓派 很高兴宣布Visual Studio Web Standards Update 。 这为所有版本的Visual Studio添加了对HTML5,CSS3和新JavaScript功能的更好支持。

Note that this isn't an official Microsoft product release, rather improved support from passionate people done in their spare time.

请注意,这不是正式的Microsoft产品版本,而是热情的工作人员在业余时间提供的更好的支持。

下载第一个Visual Studio Web标准更新 (Download the first Visual Studio Web Standards Update)

HTML5 moves fast, and this update will aim to keep up with it. It adds support to Visual Studio and the editor for HTML5, CSS3 and new JavaScript features. The goal is perhaps an update every quarter or so as new features or elements emerge.  We want ASP.NET web developers to always be able to use the latest standards, as well as being able to choose from existing standards. Remember that you can use HTML5 today along with JavaScript libraries like Modernizr that allow you to create pages that work across nearly all browsers, including old crappy ones.

HTML5进展很快,此更新旨在与时俱进。 它增加了对Visual Studio和HTML5,CSS3和新JavaScript功能编辑器的支持。 目标可能是每季度左右更新一次,以出现新功能或元素。 我们希望ASP.NET Web开发人员始终能够使用最新标准,并且能够从现有标准中进行选择。 请记住,您现在可以将HTML5与JavaScript库(例如Modernizr)一起使用,该库使您可以创建可在几乎所有浏览器(包括旧的浏览器)上运行的页面。

The Visual Studio Web Standards Update provides you with intellisense and validation for:

Visual Studio Web标准更新为您提供了以下方面的智能感知和验证:

HTML 5功能 (HTML 5 features)

浏览器API(Browser APIs)

  • Geo-Location - Location aware websites are a clear, growing trend and now you've got full intellisense and validation within Visual Studio.  For a nice sample, view source on the IE9 test drive demo.

    地理位置-具位置感的网站是一个明显的,正在增长的趋势,现在您在Visual Studio中已经有了完整的智能感知和验证。 要获得一个不错的示例,请在IE9测试驱动器演示中查看源代码。

  • Local Storage – IE has been supporting local storage from IE8, so now Visual Studio will provide you with full-fidelity intellisense to create sites which can save state within the browser.  For sample of this, do a view source on HTML5 Demo Site

    本地存储-IE一直支持IE8的本地存储,因此Visual Studio现在将为您提供全保真智能,以创建可在浏览器中保存状态的站点。 有关此示例,请在HTML5演示网站上查看视图

CSS3(CSS3)

Additionally, if you are trying to make websites which work on a variety of platforms and browsers you will love the fact that Web Standards Update not only supports IE specific prefixes like –ms; but also other vendor prefixes like –webkit and –moz.

另外,如果您试图使网站能够在各种平台和浏览器上运行,那么您会喜欢Web Standards Update不仅仅支持IE特定前缀,例如–ms 。 还有其他供应商前缀,例如–webkit–moz。

Visual Studio中HTML5 (HTML5 in Visual Studio)

When you start up Visual Studio 2010, you can select what version of HTML you want on a file-by-file basis, or set the defaults.

启动Visual Studio 2010时,可以逐文件选择所需HTML版本,或设置默认值。

Side Note: See how IE6 is in there on its own? That's been there since before forever. Hopefully it'll be gone soon. Ignore it.

旁注:看看IE6本身如何存在? 从那以后一直存在。 希望它会很快消失。 忽略它。

HTML5 in the HTML Toolbar dropdown

You can also set it as the default in Tools | Options | Text Editor | HTML | Validation. Note the options for errors.

您也可以将其设置为“工具”中的默认选项。 选项| 文字编辑器| HTML | 验证。 注意错误选项。

All the new HTML5 semantic tags are there, like section, svg, video, etc. This is just the first release, and while it's REALLY comprehensive, I'm sure it has some bugs. But, it'll be updated regularly, so make sure you report anything you find and look for it to be fixed in the next release.

所有新HTML5语义标记都在那里,例如section,svg,video等。这只是第一个发行版,尽管它确实很全面,但是我敢肯定它存在一些错误。 但是,它将定期更新,因此请确保报告发现的所有内容,并希望在下一发行版中对其进行修复。

Adding an Audio Tag

There's even support for important (but under-utilized and under-respected) attributes like the WAI-ARIA (Web Accessibility Initiative - Accessible Rich Internet Applications)

甚至还支持诸如WAI-ARIA (网络可访问性计划-可访问的富Internet应用程序)之类的重要(但未得到充分利用和尊重的)属性的支持。

Adding a main role to a nav tag

Also the aria-* attributes appear not only as intellisense enabled attributes, but also their enumerated values:

aria- *属性不仅显示为启用智能感知的属性,而且还显示为枚举值:

Adding aria-autocomplete to an IMG tag

Tags are fun, sure, but how about microdata? Bing, Google and Yahoo are all supporting Microdata and more specifically the schema.org vocabularies. This update will therefore add intellisense to the most popular vocabularies including schema.org and data-vocabulary.org.

标签很有趣,但是微数据呢? Bing,Google和Yahoo都支持Microdata ,尤其是schema.org词汇表。 因此,此更新将在最流行的词汇表(包括schema.orgdata-vocabulary.org)中增加智能感知。

Adding http://schema.org/ attributes to an article

Seriously, tell me that's NOT the hotness. Awesome for SEO.

认真地说,告诉我那不是热门。 很棒的SEO。

Visual Studio中CSS3 (CSS3 in Visual Studio)

That's just the HTML5 stuff. There's also CSS3 support. Yes, that's 1 better than CSS2.

那只是HTML5的东西。 还有CSS3支持。 是的,那比CSS2好1。

CSS3 in the dropdown

It includes all the cool new CSS3 stuff like column-full and of course border-radius as well as animations and transforms. There's also lots of details on vendor-specific prefixes like -webkit, -moz and -ms.

它包括所有很酷CSS3新内容,例如专栏满,当然还有边界半径,以及动画和变换。 关于供应商特定的前缀,例如-webkit,-moz和-ms,还有很多详细信息。

Note the informational tooltip in the dropdown here as we pick a -webkit-transform shorthand property.

请注意此处的下拉菜单中的信息工具提示,因为我们选择了-webkit-transform速记属性。

Visual Studio中JavaScript和HTML5 (JavaScript and HTML5 in Visual Studio )

There's a huge number of additions to JavaScript intellisense in this update. Things like geolocation via navigator.geolocation and DOM storage via window.localStorage.

在此更新中,JavaScript intellisense有大量新增功能。 诸如通过navigator.geolocation进行地理定位以及通过window.localStorage进行DOM存储之类的事情。

Here's a slightly less trivial snippet of HTML5 and JavaScript using some new local storage features and showing the intellisense.

这是使用一些新的本地存储功能并显示智能感知HTML5和JavaScript的简单片段。

Say what you like about intellisense as a concept or crutch, but I like to think of it as a just-in-time object browser that helps me explore new technologies as well as discover nooks and crannies that I might not see.

说出您对智能感知作为概念或拐杖的看法,但我想将其视为一种即时对象浏览器,它可以帮助我探索新技术以及发现可能看不到的角落和缝隙。

We don't know what all will come in the next version of Visual Studio, or the next version of HTML5, but for those of you who are interested, we hope this "living update" of Web Standards support for Visual Studio will help you out!

我们不知道下一版的Visual Studio或下一版HTML5将提供什么,但是对于那些有兴趣的人,我们希望对Visual Studio的Web Standards支持的这一“最新更新”能够为您提供帮助出来!

Enjoy, Dear Reader.

享受,亲爱的读者。

P.S. This is an update for ASP.NET and HTML5 editing people who want to use HTML5, new JavaScript features and CSS3. I didn't mention Silverlight because it has nothing to do with Silverlight. I said once "just because your favorite technology isn't mentioned in a keynote doesn't mean it's dead." Assume that the same rule applies to a Blog Post.

PS这是针对希望使用HTML5,新JavaScript功能和CSS3的ASP.NET和HTML5编辑人员的更新。 我没有提到Silverlight,因为它与Silverlight无关。 我说过一次,“只是因为您在主题演讲中没有提到您喜欢的技术并不意味着它已经死了。” 假设相同的规则适用于Blog Post。

P.P.S. No, that logo to the right isn't official anything and yes, it's fun.

PPS不,右边的徽标不是官方的任何东西,是的,这很有趣。

Related Links

相关链接

翻译自: https://www.hanselman.com/blog/announcing-the-web-standards-update-html5-support-for-the-visual-studio-2010-editor

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值