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.
在 Ubuntu 上使用 Bootstrap 2.3、Bootbox并在 Google Chrome 中查看结果时,按钮周围的边框不太吸引人,因为它是自动对焦的。一旦显示模式,我还没有找到任何 api 挂钩来触发模糊事件。有没有办法单独使用 javascript 或仅使用 css 删除自动对焦,但没有分叉项目的选项,删除自动对焦并使其可配置?
2.3
没有 API 挂钩,但您可以通过将 javascript 事件处理程序附加到警报来实现:
var bbAlert = bootbox.alert('Alert!') bbAlert.on('shown.bs.modal', function(){ $('.btn-primary').blur(); });