Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有带有 Bootstrap 下拉菜单的骨干应用程序。不幸的是,切换必须是一个链接才能获得良好的风格。因此,当单击切换打开下拉菜单时,主干路由会发生变化。有没有办法避免这种行为。
因此,最简单的解决方案似乎使用 aspan而不是链接并为其设置样式:
span
.navbar .nav > li > span.dropdown-toggle { float: none; padding: 10px 15px 10px; color: #777777; text-decoration: none; text-shadow: 0 1px 0 #ffffff; display: block; }