改变下拉指针的位置?

时间:2016-05-27 07:07:59

标签: html css twitter-bootstrap-3

 <div class="dropdown">
  <a data-toggle="dropdown" href="#">Dropdown trigger</a>
  <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
    ...
  </ul>
</div>

我需要将指针水平移动到下拉菜单吗? 这是fiddle

1 个答案:

答案 0 :(得分:1)

试试这个,您必须更改箭头,更改位于fiddle

.dropdown {
    display: inline-block;
}
.dropdown-menu {
    left: 110%;
    top: 0;
}
.dropdown-menu:before {
    top: 0;
    left: -8px;
    border-top: 7px solid transparent;
    border-right: 7px solid #ccc;
    border-bottom: 7px solid transparent;
    border-left: none;
}
.dropdown-menu:after {
    top: 0;
    left: -6px;
    border-top: 6px solid transparent;
    border-right: 6px solid #ffffff;
    border-bottom: 6px solid transparent;
    border-left: none;
}