如何在 IntelliJ IDE 中添加引导自动代码完成功能?

Onl*_*ine 5 bootstrapping autocomplete intellij-idea

我在 IntelliJ IDEA 中添加了 Bootstrap3 插件,还在 html 页面中添加了 css 和 js 链接。但我无法获得引导类名称等的自动完成功能。我怎样才能实现这一点?

小智 4

我遇到了同样的问题,最终发现了这个:https ://intellij-support.jetbrains.com/hc/en-us/community/posts/206324479-How-to-activate-autocomplete-with-Bootstrap

技巧是你不能使用 cdn 提供的 css - 你必须在本地引用它。

这条线对我有用(html 文件位于 .../resources/templates/ 中, bootstrap .css 文件已下载到 .../resources/static ):

<link rel="stylesheet" href="../static/bootstrap.css">
Run Code Online (Sandbox Code Playgroud)

我确实需要等待一段时间才能让 intellij 首先对其建立索引。

希望有帮助:)