通过CDN的Bootstrap的Visual Studio intellisense [英] Visual Studio intellisense for Bootstrap via CDN

查看:258
本文介绍了通过CDN的Bootstrap的Visual Studio intellisense的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过Microsoft CDN安装了Bootstrap:

 < head> 
...
< link href =// ajax.aspnetcdn.com/ajax/bootstrap/3.1.1/css/bootstrap.min.css =stylesheettype =text / css/>
< link href =// ajax.aspnetcdn.com/ajax/bootstrap/3.1.1/css/bootstrap-theme.min.css =stylesheettype =text / css/> ;
< / head>

 < body> 
...
< script src =// ajax.aspnetcdn.com/ajax/bootstrap/3.1.1/bootstrap.min.js\"> ;</script>
< / body>

一切都与Bootstrap正常工作,但是Visual Studio没有给我任何intellisense



例如,输入

 < div class =(intellisense应该在这里打开)

没有出现。



有没有办法从CDN获得intellisense?

解决方案

您可以添加CDN引用intelliSence https://i.stack.imgur.com/Hvz1r.pngalt =Visual Studio 2013选项>



您可以将文件添加到项目,它会工作,你不需要添加一个ref到html,只是为了项目,它应该可以解决你的问题。


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>

and

<body>
    ...
    <script src="//ajax.aspnetcdn.com/ajax/bootstrap/3.1.1/bootstrap.min.js"></script>
</body>

Everything is working fine with Bootstrap, however, Visual Studio isn't giving me any kind of intellisense for the classes.

For example, typing

<div class="(intellisense should open here)

nothing comes up.

Is there any way to get intellisense from the CDN?

解决方案

You can add CDN references to intelliSence for javascript, however, css is not supported.

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 intellisense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆