如何使Bootstrap 4 Cover示例工作?

问题描述 投票:1回答:3

我是初学者。如何使Bootstrap 4 cover example正常工作,以便自己编辑?

我已经尝试下载源代码,将bootstrap.min.css和.js放在我的主文件夹中,然后查看页面源代码以获取模板的代码并将其粘贴到我的index.html中。预览时,我看到的只是纯Bootstrap文字...我缺少什么步骤?

templates bootstrapping cover
3个回答
1
投票

您必须修复html文件中的路径。

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

应该是

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

如果css文件和index.html位于同一文件夹中。html底部的bootstrap.min.js也是如此。此外,您需要cover.css并将其保存在与html相同的目录中。


0
投票

要添加图像,请将以下代码添加到cover.scss中的body标记中

cover.css

0
投票

实际的源代码,以及所有其他引导程序示例在这里。 background: image-url('background.jpg') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;

URL可能会随着引导程序的更新而改变

© www.soinside.com 2019 - 2024. All rights reserved.