twitter-bootstrap 如何在不使用 CDN 的情况下调用引导程序文件?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31691893/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 23:00:20  来源:igfitidea点击:

How to call the bootstrap files without using CDN?

twitter-bootstrap

提问by shakira

I have downloaded the bootstrap folder from the site. And i have a folder named demoproject on my desktop and in that the bootstrap folder is present. How should i call these bootstrap files without using CDN so it runs without internet connection.

我已经从站点下载了 bootstrap 文件夹。我的桌面上有一个名为 demoproject 的文件夹,其中存在 bootstrap 文件夹。我应该如何在不使用 CDN 的情况下调用这些引导程序文件,以便它在没有互联网连接的情况下运行。

回答by Anson VanDoren

Just make sure that the lines in your HTML file that look like this:

只需确保 HTML 文件中的行如下所示:

<link href="css/bootstrap.min.css" rel="stylesheet">

and

<script src="js/bootstrap.min.js"></script>

are pointing to your local files (similar to shown above) and not to the CDN.

指向您的本地文件(类似于上面显示的)而不是 CDN。

回答by Santhosh BS

Bootstrap with CDN

使用 CDN 引导程序

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

Bootstrap with out CDN

没有 CDN 的引导程序

<link rel="stylesheet" href="foldername/bootstrap.min.css">

<script src="foldername/bootstrap.min.js"></script>