For Bootstrap 4 stable:(对于Bootstrap 4稳定:)
Since beta Bootstrap 4 doesn't depend on Tether but Popper.js .
(因为beta Bootstrap 4不依赖于Tether而是依赖于Popper.js 。)
All scripts ( must be in this order):(所有脚本( 必须按此顺序):)
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
See the current documentation for the newest script versions.
(有关最新脚本版本,请参阅当前文档 。)
Only Bootstrap 4 alpha:(只有Bootstrap 4 alpha:)
Bootstrap 4 alpha needs Tether , so you need to include tether.min.js
before you include bootstrap.min.js
, eg.
(Bootstrap 4 alpha需要Tether ,因此在包含bootstrap.min.js
之前需要包含tether.min.js
。)
<script src="https://npmcdn.com/[email protected]/dist/js/tether.min.js"></script>
<script src="https://npmcdn.com/[email protected]/dist/js/bootstrap.min.js"></script>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…