通过 CDN 用于 Bootstrap 的 Visual Studio 智能感知 [英] Visual Studio intellisense for Bootstrap via CDN
问题描述
我已经通过 Microsoft CDN 安装了 Bootstrap,例如:
I've installed Bootstrap via the Microsoft CDN like:
<head>
...
<link href="//ajax.aspnetcdn.com/ajax/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="//ajax.aspnetcdn.com/ajax/bootstrap/3.1.1/css/bootstrap-theme.min.css" rel="stylesheet" type="text/css" />
</head>
和
<body>
...
<script src="//ajax.aspnetcdn.com/ajax/bootstrap/3.1.1/bootstrap.min.js"></script>
</body>
Bootstrap 一切正常,但是,Visual Studio 没有为我提供任何类的智能感知.
Everything is working fine with Bootstrap, however, Visual Studio isn't giving me any kind of intellisense for the classes.
例如,输入
<div class="(intellisense should open here)
什么都没发生.
有没有办法从 CDN 获取智能感知?
Is there any way to get intellisense from the CDN?
推荐答案
您可以为 javascript 添加对 intelliSence 的 CDN 引用,但是不支持 css.
You can add CDN references to intelliSence for javascript, however, css is not supported.
您可以将文件添加到您的项目,它会起作用,您不需要添加对 html 的引用,只需添加到项目即可解决您的问题.
You can add the file to your project and it will work, you dont need to add a ref to html, just to project and it should resolve your issue.
这篇关于通过 CDN 用于 Bootstrap 的 Visual Studio 智能感知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!