Bootstrap 4 navbar-inverse没有颜色 [英] Bootstrap 4 navbar-inverse doesn't have colour

查看:70
本文介绍了Bootstrap 4 navbar-inverse没有颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我决定尝试使用新的引导程序版本(4).我对文件做了一切正确的操作(下面是我的html)

Recently I decided to try new bootstrap version (4). I did everything right with files (my html below)

<!DOCTYPE html>
<html lang="pl">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Bootstrap 4 website</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/style.css">
</head>
<body>

    <nav class="navbar navbar-inverse">
        <a href="#">Link1</a>
    </nav>

    <!-- JS scripts here -->
    <script src="js/jquery-3.2.1.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/script.js"></script>
</body>
</html>

但是我的导航栏(navbar-inverse)没有颜色.您见过与Bootstrap 4类似的东西吗?

but my navbar (navbar-inverse) has no colour. Have You ever seen something similar with Bootstrap 4?

推荐答案

在Bootstrap 4中,您想要更改背景类的nav标签(.bg-light或.bg-dark).

In Bootstrap 4 you want to change the background class the nav tag (.bg-light or .bg-dark).

<nav class="navbar navbar-expand-md bg-dark">

接下来,您可以使用navbar-dark更改文本的颜色以适合较暗的对比度.

Next you can use navbar-dark to change the color of the text to fit the darker contrast.

这篇关于Bootstrap 4 navbar-inverse没有颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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