Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何将背景图像仅添加到引导Navbar的第一个li元素_Css_Twitter Bootstrap_Twitter Bootstrap 3 - Fatal编程技术网

Css 如何将背景图像仅添加到引导Navbar的第一个li元素

Css 如何将背景图像仅添加到引导Navbar的第一个li元素,css,twitter-bootstrap,twitter-bootstrap-3,Css,Twitter Bootstrap,Twitter Bootstrap 3,请看一下这段代码和下面的代码,让我知道如何只在导航栏的第一个中添加反向图像 .navbar-inner{ background:none ! important; } li:first-child { background-image: url(http://themes/kids/images/lava-top.png); background-repeat: repeat-x; } 看 看 .navbar .nav > li:first-child > a, .

请看一下这段代码和下面的代码,让我知道如何只在导航栏的第一个
  • 中添加反向图像

    .navbar-inner{
      background:none ! important;
    }
    
    li:first-child {
      background-image: url(http://themes/kids/images/lava-top.png);
      background-repeat: repeat-x;
    
    }
    

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