Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html Bootstrap3下拉菜单对齐_Html_Css_Twitter Bootstrap 3 - Fatal编程技术网

Html Bootstrap3下拉菜单对齐

Html Bootstrap3下拉菜单对齐,html,css,twitter-bootstrap-3,Html,Css,Twitter Bootstrap 3,我在我的项目中使用bootstrap3,并在我的工具中添加了一个大菜单,我在snippets网站上找到了这个菜单 当我添加菜单时,我试图让它在按钮下方对齐,但它向右关闭 我试过了,但没什么改变 .下拉列表大{ 左:继承 } 如果需要,可以在此处找到示例代码: 下面是菜单后面的CSS,它自己: .dropdown-large { position: static !important; } .dropdown-menu-large { margin-left: 16px; margin

我在我的项目中使用bootstrap3,并在我的工具中添加了一个大菜单,我在snippets网站上找到了这个菜单

当我添加菜单时,我试图让它在按钮下方对齐,但它向右关闭

我试过了,但没什么改变

.下拉列表大{ 左:继承 }

如果需要,可以在此处找到示例代码:

下面是菜单后面的CSS,它自己:

.dropdown-large {
  position: static !important;
}
.dropdown-menu-large {
  margin-left: 16px;
  margin-right: 16px;
  padding: 20px 0px;
}
.dropdown-menu-large > li > ul {
  padding: 0;
  margin: 0;
}
.dropdown-menu-large > li > ul > li {
  list-style: none;
}
.dropdown-menu-large > li > ul > li > a {
  display: block;
  padding: 3px 20px;
  clear: both;
  font-weight: normal;
  line-height: 1.428571429;
  color: #333333;
  white-space: normal;
}
.dropdown-menu-large > li ul > li > a:hover,
.dropdown-menu-large > li ul > li > a:focus {
  text-decoration: none;
  color: #262626;
  background-color: #f5f5f5;
}
.dropdown-menu-large .disabled > a,
.dropdown-menu-large .disabled > a:hover,
.dropdown-menu-large .disabled > a:focus {
  color: #999999;
}
.dropdown-menu-large .disabled > a:hover,
.dropdown-menu-large .disabled > a:focus {
  text-decoration: none;
  background-color: transparent;
  background-image: none;
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  cursor: not-allowed;
}
.dropdown-menu-large .dropdown-header {
  color: #428bca;
  font-size: 18px;
}
@media (max-width: 768px) {
  .dropdown-menu-large {
    margin-left: 0 ;
    margin-right: 0 ;
  }
  .dropdown-menu-large > li {
    margin-bottom: 30px;
  }
  .dropdown-menu-large > li:last-child {
    margin-bottom: 0;
  }
  .dropdown-menu-large .dropdown-header {
    padding: 3px 15px !important;
  }
}
我怎样才能把菜单再往左移呢


更新:这里是一个问题的小提琴。将窗口拖大;您将在页面右侧看到它是一个静态位置

我能想到的唯一一件不会打乱其他功能的事情是:

演示:

不要使用!重要的是,在媒体查询之外要更加具体:

.dropdown.dropdown-large {
  position: static;
}
添加到css的末尾:


必须有另一个CSS来做这件事。你有其他的CSS吗?把你的代码添加到一个完整的问题中,并添加到你的问题的链接。需要看到这个重新创建。它只是正常的引导CSS和上面的代码-当我把窗口变大时,它在屏幕右侧有一个静态位置。不管怎样,它总是从右边开始5个像素what@misterManSambootply现在已关闭,无法保存任何内容。这里有一些东西似乎是一种更流畅的体验:
@media (min-width: 1300px) { 
    .dropdown-menu-large {
        min-width: 600px; /*needs a width or add width to the stuff inside it */
    }

    .navbar-nav .dropdown.dropdown-large {
        position: relative
    }
}