2

类建议,我试图从Visual Studion临2013到Visual Studio代码转换。看起来Code不像2013年那样对HTML类建议感兴趣。我是否缺少配置选项或其他?我在选项中搜索bootstrap,但什么也没找到。引导(HTML)在VS代码

enter image description here

<head> 
    <!-- Latest compiled and minified CSS --> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" 
    crossorigin="anonymous"> 

    <!-- Optional theme --> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css" integrity="sha384-aUGj/X2zp5rLCbBxumKTCw2Z50WgIr1vs/PFN4praOTvYXWlVyh2UtNUU0KAUhAX" 
    crossorigin="anonymous"> 

    <!-- Latest compiled and minified JavaScript --> 
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" 
    crossorigin="anonymous"></script> 
    <title>Bootstrap 101 Template</title> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
</head> 

<body> 
    <h1>Hello, world!</h1> 
    <span class="" 
</body> 

</html> 
+0

AFAIK HTML插件需要对这个方向进行一些改进。 – Wosi

+0

@Wosi是的。我看着https://code.visualstudio.com/docs/languages/html并没有什么可说的CSS类支持。我想我只是认为他们会。 – Fuhrmanator

+0

我认为VS支持热线无法帮忙?那将是首先检查支持的地方。 –

回答

0

简而言之:
1.安装在HTML CSS Support Extension vscode。即:ext install vscode-html-css
2.添加resource.json文件您.vscode或项目的根文件夹中,您可以配置路径,您使用样式表。
3.添加以下代码到resource.json文件。

{ 
    "css": { 
    "style": [ 

     "replace_with_path_to_your_css_bootstrap_file" //i.e bower_components/bootstrap/dist/bootstrap.css 
    ] 
    } 
} 

保存&
做!
Credits:dwonisch