Change the color of the upward arrow on an open dropdown-menu
-
27-10-2019 - |
سؤال
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)?
المحلول
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;
}
لا تنتمي إلى StackOverflow