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