如何添加背景 - 图像到bootstrap Navbar first li元素

时间:2013-10-03 03:26:59

标签: css twitter-bootstrap twitter-bootstrap-3

您能否请看一下这个jsfiddle及以下代码,让我知道如何将导航图像添加到导航栏的第一个<li>

.navbar-inner{
  background:none ! important;
}

li:first-child {
  background-image: url(http://themes/kids/images/lava-top.png);
  background-repeat: repeat-x;

}

1 个答案:

答案 0 :(得分:1)

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; 
}