Bootstrap里的文件分别表示什么?都有什么用处?

JavaScript011

Bootstrap里的文件分别表示什么?都有什么用处?,第1张

Bootstrap里的文件有以下几种:

bootstrap.js

bootstrap.css

bootstrap.min.js

bootstrap.min.css

bootstrap-responsive.min.css

bootstrap-responsive.css

它们分别的作用为:

bootstrap.js:是bootstrap的所有js指令的总和。

bootstrap里面所有的js效果,都是由bootstrap.js控制的。

bootstrap.js供开发的时候进行调试用。

bootstrap.css:是未压缩的,完整的bootstrap样式表,供开发的时候进行调试使用。

bootstrap.min.js:是压缩的bootstrap样式表,在部署网站的时引用。

bootstrap-responsive.min.css:是bootstrap-responsive.css的压缩版,在部署网站的时引用。

bootstrap-responsive.css:是对bootstrap框架应用了响应式布局之后所需要的CSS样式表,

模板使用首先要看你后台使用是什么程序,如果是php,python等,你可能需要修改html代码,进行一些变量的替换。

如果是前后端分离架构,你可能需要根据接口情况,适当修改html代码,将一部分代码数据通过ajax进行请求获取。

模板嵌套最重要的就是通过控制台查看路径是否正确,如果不正确,页面加载的时候css,图片等样式就会出现问题。

bootstrap3的 JavaScript 组件

Component animations

Dropdown

Tooltip

Popover

Modal

Carousel

如果使用了bootstrap的组件,比如Modal,会注册到jQuery.fn

if (typeof jQuery === 'undefined') {

  throw new Error('requires jQuery')

}

if (typeof jQuery.fn.modal === 'undefined') {

  throw new Error('requires bootstrap.modal')

}

这样可以判断是否加载了bootstrap,要是判断加载完成,加个定时器?