我是 bootstrap 的新手(刚开始学习),我最近在 http://getbootstrap.com/docs/3.3/customize/ 上自定义了我的 bootstrap 文件
我编译并下载了,然后我发现很难将它与我的 index.html 文件链接起来。 Bootstrap 文件的源位于本地驱动器上,在我的代码中它看起来像这样
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="desc">
<meta name="keywords" content="content">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous" >
<link rel="stylesheet" href="css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<title>TITLE</title>
</head>
<body>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="js/bootstrap.min.js"/>
</body>
</html>
请帮助:)
最佳答案
如果您不熟悉 Bootstrap,首先应该使用最新版本(即 Bootstrap 4.0)。
启动元素的一个好方法是使用 CDN,Bootstrap 文件托管在远程服务器上,因此您不必在本地管理 Bootstrap 文件。 https://getbootstrap.com/docs/4.0/getting-started/download/#bootstrapcdn
检查浏览器中的控制台以确保所有内容都已正确加载。
要包含您的自定义 css,只需像处理任何 html 页面一样将您的 css 放在 head 中。
<head>
<link rel="stylesheet" type="text/css" href="custom_main.css">
</head>
关于html - 如何将自定义引导链接到 index.html 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48577598/