如何修复 bootstrap 下拉菜单定位

How to fix bootstrap dropdown menu positioning

我正在尝试实施通知系统,通知下拉按钮位于我的导航栏右侧,当我单击它时会显示结果,但它的一部分总是在浏览器视图之外。我没有开始这个项目,天知道这里包含了什么我只知道我的 bootstrap 是 4.0.0 beta

我试过使用 .dropdown-menu.dropdown-menu-right 位它仍然保持不变

.dropdown{"data-behavior" => "notifications"}
  %button#dropdownMenuButton.btn.btn-secondary.dropdown-toggle{"aria-expanded" => "false", "aria-haspopup" => "true", "data-behavior" => "notifications-link", "data-toggle" => "dropdown", :type => "button"}
    %i.fa.fa-bell
    %span{"data-behavior" => "unread-count"}
  .dropdown-menu{"aria-labelledby" => "dropdownMenuButton", "data-behavior" => "notification-items"}

终于找到答案我的 bootstrap.css 刚刚被另一个 css 文件覆盖,该文件有自己的下拉样式