如何更改引导程序导航栏切换器图标? [英] How to change bootstrap navbar toggler icon?

查看:43
本文介绍了如何更改引导程序导航栏切换器图标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用引导程序.我想知道是否有办法更改引导程序切换器图标.

I've been using bootstrap for a while. I'm wondering if there's way to change the bootstrap toggler icon.

推荐答案

在 bootstrap.min.css 中定义为:

It's defined in bootstrap.min.css as:

.navbar-light .navbar-toggler-icon {
 background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30'
 xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)'
 stroke-width='2' stroke-linecap='round' stroke-miterlimit='10'
 d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")
}

因此,使用您自己的图像覆盖它,如下所示是相当简单的:

So, overriding this with your own image, as shown below is reasonably straight-forward:

.navbar-light .navbar-toggler-icon {
background-image: url("https://cdn4.iconfinder.com/data/icons/ionicons/512/icon-ios7-bell-512.png");
}

这篇关于如何更改引导程序导航栏切换器图标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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