문제

I'm working with twitter bootstrap 2.0.1

I'm trying to change the color of the dropdown-menu.

I have managed to change the color of the container that is comming down itself, however I can't seem the find where the arrow is comming from.

Anyone know where I can find the code where the arrow comes from (and how to change it's color)?

examle

도움이 되었습니까?

해결책

The arrow code can be found on line:2690 of the bootstrap.css. You can manipulate its position and color by modifying its css, e.g.:

.navbar .dropdown-menu:after {
  content: '';
  display: inline-block;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #000; /* change color here, modified for a black arrow */
  position: absolute;
  top: -6px;
  left: 10px;
}

다른 팁

In the latest Version of Bootstrap (v2.3.1), this has changed. It's now on line 694

.navbar .nav>li>.dropdown-menu:after{
content:'';
display:inline-block;
border-left:6px solid transparent;
border-right:6px solid transparent;
border-bottom:6px solid #ffffff;
position:absolute;
top:-6px
;left:10px;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top