0

如何在移动设备上查看菜单/导航栏的悬停文本颜色为白色。我已经尝试查看引导程序的 css 代码,但我找不到它。屏幕

4

1 回答 1

2

您可以编写媒体查询来满足li元素的特定悬停状态,例如:
Jsfiddle Demo

  @media (max-width: 767px) {

.navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus {
background-color: #888;/* change this color*/
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.125) inset;
color: #555555;
text-decoration: none;
  }
  } 
 @media (max-width: 767px) {

 .nav-collapse .nav > li > a:hover, .nav-collapse .nav > li > a:focus, .nav-collapse .dropdown-menu a:hover, .nav-collapse .dropdown-menu a:focus {
 background-color: #000;/*you can change this color to anything*/
  }
 }
  @media (max-width: 480px) {

     .nav-collapse .nav > li > a:hover, .nav-collapse .nav > li > a:focus, .nav-collapse .dropdown-menu a:hover, .nav-collapse .dropdown-menu a:focus {
 background-color: #000;/* you can change this color to anything */
}
}
于 2013-03-05T07:41:00.670 回答