你能看看这个吗jsfiddle和下面的代码,让我知道如何将背景图像添加到第一个 <li>
导航栏的?
.navbar-inner{
background:none ! important;
}
li:first-child {
background-image: url(http://themes/kids/images/lava-top.png);
background-repeat: repeat-x;
}
最佳答案
参见 this .
.navbar .nav > li:first-child > a, .navbar .nav > li:first-child > a:hover, .navbar .nav > li:first-child > a:focus
{
background-image: url(https://www.google.com/images/srpr/logo6w.png);
background-repeat: repeat-x;
}
关于css - 如何添加背景 - 仅 Bootstrap Navbar 第一个 li 元素的图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19150235/