我在哪里可以获得Bootstrap transitions.js?

时间:2016-12-06 10:45:57

标签: javascript twitter-bootstrap-3

我想使用Bootstrap Collapse plugin

  

折叠需要将转换插件包含在您的   Bootstrap的版本。

我已下载bootstrap-3.3.7-dist.zip但不包含此处提到的transitions.jshttp://getbootstrap.com/javascript/#transitions

我看过Gitbub的代表(https://github.com/twbs/bootstrap/tree/v4-dev/js/dist),没有运气。

我从哪里可以获得Bootstrap transitions.js

5 个答案:

答案 0 :(得分:2)

dist / js文件夹包含bootstrap编译的js,文档说明了这一点:

  

如果你正在使用编译的(或缩小的)bootstrap.js,则不需要包含它 - 它已经存在了。

否则,你可以You can download the sources,文件在js文件夹中。

答案 1 :(得分:0)

我总是将此代码添加到我的HTML文件中,一切正常。以下是Bootstrap collapse Bootstrap Collapse

的链接
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

答案 2 :(得分:0)

答案 3 :(得分:0)

崩溃功能的单个代码也需要CSS

<script src="js/Plugins/bootstrap-collapse/bootstrap-collapse.js"></script>

<style>
.collapse {display: none;}
.collapse.in {display: block;}
.collapsing {position: relative;height: 0;overflow: hidden;-webkit-transition-timing-function: ease;-o-transition-timing-function: ease;transition-timing-function: ease;-webkit-transition-duration: .35s;-o-transition-duration: .35s;transition-duration: .35s;-webkit-transition-property: height,visibility;-o-transition-property: height,visibility;transition-property: height,visibility;}
</style>

我创建了一个.js文件,它是transition.js和&amp;的组合。 collapse.js

答案 4 :(得分:0)

默认情况下,它是在bootstrap.js主文件(及其最小对应文件)中编译的。您可以轻松地打开它(非缩小版),并看到类似以下注释的内容

 /* ========================================================================
     * Bootstrap: transition.js v3.4.1
     * https://getbootstrap.com/docs/3.4/javascript/#transitions
     * ========================================================================
     * Copyright 2011-2019 Twitter, Inc.
     * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
     * ======================================================================== */
......

    /* ========================================================================
     * Bootstrap: collapse.js v3.4.1
     * https://getbootstrap.com/docs/3.4/javascript/#collapse
     * ======================================================================== 

还请注意,在主custom download page of bootstrap中,所有插件均已选中,除非您需要更小且自定义的js和CSS文件