如何导入 popper.js? [英] How to import popper.js?

查看:30
本文介绍了如何导入 popper.js?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个蹩脚的问题,但我无法弄清楚.如何导入 Bootstrap 4 beta 自带的 popper.js?

It seems to be a lame question, but I cannot figure it out. How to import popper.js which comes together with Bootstrap 4 beta?

我使用 Bower,并且安装了 Bootstrap 4 测试版.现在在 bower_components 文件夹中,有 popper.js 目录,其中包含几个子文件夹.问题是没有 dist 文件夹和 popper.min.js 文件.

I use Bower, and I've installed Bootstrap 4 beta. Now in the bower_components folder, there is the popper.js directory, which contains a few sub-folders. The problem is there is no dist folder and the popper.min.js file.

Bootstrap 4 CDN 指南链接:https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js.

Bootstrap 4 guide links to CDN: https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js.

如何在没有 CDN 的情况下导入 popper.js?在哪里可以找到 popper.min.js 文件?

How to import popper.js without CDN? Where to find the popper.min.js file?

即使我从 popper.js 网站下载了一个 zip 文件,它包含的文件与我从 Bower 下载的文件相同.

Even if I download a zip file from the popper.js website, it contains the same files as I've downloaded from Bower.

推荐答案

我遇到了同样的问题.

我从引导程序网站上的 CDN 下载了popper.min.js"文件.

I downloaded the 'popper.min.js' file from the CDN on the bootstrap website.

见这里:https:///cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js

比编译项目更容易.

重要提示:您必须在 jquery 之后但在引导之前包含 popper.

Important: You must include popper after jquery but BEFORE bootstrap.

这篇关于如何导入 popper.js?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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