是否可以在 VS2010 中更改 CSS 验证方案

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3931801/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 22:57:18  来源:igfitidea点击:

Is it possible to change CSS Validation scheme in VS2010

cssvisual-studio-2010visual-studioeditor

提问by Gareth Davis

I'm editing a simple CSS file in VS2010 and the editor seems to have a rather limited understanding of CSS, for example:

我正在 VS2010 中编辑一个简单的 CSS 文件,编辑器似乎对 CSS 的理解相当有限,例如:

#my-rule {
     position:relative;
}

generates a warning: Validation(CSS 1.0): 'position' is not a known CSS property name

生成警告: Validation(CSS 1.0): 'position' is not a known CSS property name

I'm guessing that there is an option some where to change the CSS validation to CSS 2.1 or some thing close, but can't for the life of me find it.

我猜有一个选项可以将 CSS 验证更改为 CSS 2.1 或某些接近的内容,但我终生无法找到它。

回答by Garry English

If you want to validate for CSS 3.0 in Visual Studio 2010, you need to install the Visual Studio 2010 Service Pack 1 and then install the "CSS 3 Intellisense Schema"

如果要在 Visual Studio 2010 中验证 CSS 3.0,则需要安装 Visual Studio 2010 Service Pack 1,然后安装“CSS 3 Intellisense Schema”

http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210/view/Discussions

http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210/view/Discussions

Then you will see "CSS 3.0" in the drop down that easwee mentioned.

然后你会在 easwee 提到的下拉菜单中看到“CSS 3.0”。

回答by easwee

You have a dropdown in the top menu where you can switch the css validation. It's called Cascading stylesheet version for validation. If you can't see it right click on the menu and check Style sheet so it will show.

您可以在顶部菜单中有一个下拉菜单,您可以在其中切换 css 验证。它被称为用于验证的级联样式表版本。如果您看不到它,请右键单击菜单并检查样式表,以便显示。

screenshot

截屏