0

我可以弄清楚如何做到这一点。这个主题帮助我:将箭头添加到 twitter bootstrap 的下拉药丸?

通过添加

.dropdown-menu::after {
  position: absolute;
  top: -6px;
  left: 10px;
  display: inline-block;
  border-right: 8px solid transparent;
  border-bottom: 8px solid white;
  border-left: 8px solid transparent;
  content: '';
}

我能够得到箭头显示。但是,箭头顶部周围没有边框,所以它现在看起来就像下拉菜单中的一个间隙。有谁知道如何将边框添加到向上箭头?

4

2 回答 2

0

为边框顶部添加规则。就像是

border-top: 8px solid white;
于 2013-10-14T21:02:25.530 回答
0

通过添加以下标记解决:

.savedsearchWrapper .dropdown-menu:after {
  position: absolute;
  top: -6px;
  left: 23px;
  display: inline-block;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #ffffff;
  border-left: 6px solid transparent;
  content: '';
}


.advancedSearchDropDown .dropdown-menu:before {
  position: absolute;
  top: -7px;
  left: 17px;
  display: inline-block;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #ccc;
  border-left: 7px solid transparent;
  border-bottom-color: rgba(0, 0, 0, 0.2);
  content: '';
}

这些是引导样式,但选择器对于我的实现来说太具体了。

于 2013-10-14T21:57:39.367 回答