有谁知道如何允许 popper.js 在 Bootstrap 4 的导航栏中进行下拉菜单?
It is old question, but it could help to someone. Bootstrap says: Popper.js isn't used to position dropdowns in navbars though as dynamic positioning isn't required. But in my usecase it is required, so @doublet2 answer helped me a lot. It is little hacky but it fix this problem .. window.bootstrap.Dropdown.prototype._detectNavbar = function(){ return false; };
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.