[英]How to adjust top always “dropdown-menu Bootstrap 3”
I'm looking for a way to getting a dropdown-menu> li is open always appear in the same location top. 我正在寻找一种获取下拉菜单的方法> li始终打开始终出现在同一位置的顶部。
When we launched the first dropdown-menu 当我们启动第一个下拉菜单时
when we launched other dropdown-menu > li > a 当我们启动其他下拉菜单> li> a
I'm using bootstrap 3, do not worry about the responsive I've completely removed, I need all the dropdown-menu start at the same top of the first dropdown-menu> li> a 我正在使用bootstrap 3,不用担心我已经完全删除了响应式,我需要所有dropdown-menu从第一个dropdown-menu的同一顶部开始> li> a
.dropdown-menu {
background-clip: padding-box;
background-color: #FFFFFF;
border: 1px solid rgba(0, 0, 0, 0.15);
// border-radius: 4px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.176);
display: none;
float: left;
font-size: 14px;
// left: 0;
left: 100%;
list-style: none outside none;
// margin: 2px 0 0;
min-width: 160px;
padding: 5px 0;
position: absolute;
text-align: left;
// top:100%; i'm tried set 0 but not work..
top: 0;
z-index: 1000;
}
I can give you code if u mention your code or jsfiddle. 如果您提到您的代码或jsfiddle,我可以给您代码。
Use Position:absolute (!impotant if required) on the right-dropdown(contains action, another action etc.) give top:0 and left = width of the first-menu(which contains Ropas, Telephonos etc) that makes the right-dropdown stay always on top 在右边的下拉菜单中使用Position:absolute(如果需要,可以加注!)(包括动作,另一个动作等),给出top:0和left =第一个菜单(包含Ropas,Telephonos等)的宽度,使右边的菜单下拉菜单始终放在最前面
You can do this.. 你可以这样做..
.dropdown-menu {
top: 0;
left: 100%;
}
Demo: http://www.bootply.com/126758 演示: http : //www.bootply.com/126758
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.