You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code 1.21.0中Bootstrap类智能提示失效求助

Fixing Bootstrap Class IntelliSense in VS Code 1.21.0

Hey there, let's work through this Bootstrap IntelliSense issue you're facing in VS Code 1.21.0. I’ve helped troubleshoot similar problems before, so here’s a structured approach to get those class suggestions working:

1. Ensure Bootstrap CSS is properly referenced in your project

  • First, double-check that your project actually includes the Bootstrap CSS file (either locally or via CDN, but local files work better for IntelliSense).
  • If you’re using a CDN link, VS Code can’t parse it for class suggestions. Download the Bootstrap CSS file (like bootstrap.css) to your project (e.g., in a css/ folder) and link it in your HTML with a relative path:
    <link rel="stylesheet" href="./css/bootstrap.css">
    
  • The IntelliSense plugins need a local file to scan and pull class names from.

2. Tweak your plugin configuration

  • The HTML CSS Support plugin you installed needs explicit paths to your Bootstrap CSS file, not just file extensions. Update your settings.json to include:
    "css.styleSheets": [
        "./css/bootstrap.css" // Replace with your actual file path
    ]
    
  • Since your VS Code version is quite old (1.21.0 is from 2018), consider switching to the dedicated Bootstrap IntelliSense plugin instead—it’s built specifically for Bootstrap and may have better compatibility with older VS Code versions.

3. Clear VS Code cache and reload

  • Sometimes cached data can block IntelliSense from working. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac), search for Reload Window, and select it to restart the editor.
  • If that doesn’t help, temporarily disable other HTML/CSS-related plugins to rule out conflicts. Test with only your chosen Bootstrap IntelliSense plugin enabled.

4. Consider VS Code version limitations

  • VS Code 1.21.0 is significantly outdated, and many modern plugins are optimized for newer versions. If all else fails and you’re able to upgrade, moving to a more recent stable version of VS Code might resolve compatibility issues that are blocking the IntelliSense feature.

内容的提问来源于stack exchange,提问作者Shantanu Jha

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 10:09:36