【问题标题】:Understanding Bootstrap and jquery in Asp.net [closed]了解 Asp.net 中的 Bootstrap 和 jquery [关闭]
【发布时间】:2015-06-27 00:27:57
【问题描述】:

所以我刚刚想出了如何下载 NuGet 包并安装了 bootstrap 和 jquery 包,但现在我有点迷失了,当我之前使用 bootstrap 时,我只有 bootstrap.min.js,与我引用的 CSS 和我的服装。

那么现在它是做什么用的:jquery-2.1.3.intellisense.js? 还有什么是 npm.js ?它与 jquery 包一起提供。

这是 Npm 文件内容的图片

如果有人可以帮助我正确理解 css 的 .theme 和 .map 以及 js 的 .map,那就太好了。从我从 iv 读到的内容中可以收集到,.Map 用于引导 2*,而 .theme 只是他们的主题,我在正确的轨道上吗?

Fonts 文件夹是自动使用的还是必须作为参考?以及它们是如何使用的?

这是我的文件夹的图像:

【问题讨论】:

  • 我要感谢 'timothclifford',因为他花时间提供帮助,尽管这篇文章非常广泛,但我现在都明白了,所以谢谢。

标签: jquery css asp.net twitter-bootstrap


【解决方案1】:

那么现在它是用来做什么的:jquery-2.1.3.intellisense.js?还 什么是 npm.js ?它带有 jquery 包。

npm 是来自 Node.js 的文件:https://www.npmjs.com/package/bootstrap

关于 Intellisense,我不太清楚为什么包含它。但可能是关于一些解析,例如类属性。

如果有人可以帮助我正确理解 .theme 和 .map css 和 js 的 .map,那就太好了

主题图确实是“主题化”。关于 .map 文件夹,我建议阅读这个主题:

what are the .map files used for in Bootstrap 3.1?

Fonts 文件夹是自动使用的还是必须使用的 参考 ?以及它们是如何使用的?

是的,列出的字体会自动使用。它们被引导样式表引用。

例如查看css时:https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.css

你会看到:

@font-face {
  font-family: 'Glyphicons Halflings';

  src: url('../fonts/glyphicons-halflings-regular.eot');
  src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}

【讨论】:

  • 感谢人的反馈,那么 npm.js 是干什么用的呢?我看了一下,它只有一堆这样的要求:require('../../js/transition.js'),那么我需要引用它吗?
【解决方案2】:

.intellisense.js 文件适用于 Visual Studio,它们扩展了您开箱即用的默认智能感知(自动完成选项)。因此,当您使用 jQuery 时,jQuery.intellisense.js 将提供额外的智能感知选项。 Mads Kristensen 可能是该主题的最佳资源:http://madskristensen.net/post/improved-javascript-intellisense-in-visual-studio

.map 文件是 JavaScript 源映射。这些允许浏览器去缩小你的脚本,这样你就可以更容易地调试它们。更多细节在这里:http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/

bootstrap-theme.css 是一个可选主题,您可以应用到 Bootstrap,您不必引用它。

字体和图标在 bootstrap.css 中引用,因此您无需明确引用这些内容。

【讨论】:

  • 哇,非常感谢,这对您很有帮助。那么我必须要引用 .intellisense.js 吗?
  • 您好,对不起,我找到了微软的资源,感谢您的大力帮助
  • 不客气。不,您不需要引用 intellisense.js 文件,只要它存在,Visual Studio 就会包含它。
  • 所以它主要用于基于 Ajax 的任务?就像你提到的自动完成,那么它会与 Ajax 自动完成控件一起使用吗?
  • 不抱歉。当我说自动完成时,我的意思是当您在 Visual Studio 中输入时。 Intellisense 是您在打字时看到的建议。我的意思的一个例子madskristensen.net.m82.be/posts/files/…
猜你喜欢
  • 1970-01-01
  • 2012-09-28
  • 2023-04-10
  • 2017-11-24
  • 1970-01-01
  • 2018-01-11
  • 2016-04-01
  • 2010-09-19
  • 1970-01-01
相关资源
最近更新 更多