bootstrap模态框怎么关闭事件


本文摘自PHP中文网,作者爱喝马黛茶的安东尼,侵删。

模态框避免点击背景处关闭:

1、div初始化时添加属性 aria-hidden=”true” data-backdrop=”static”

1

2

<div class="modal fade" id="edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden='true'

data-backdrop='static'>

2、在需要显示模态框,初始化时

1

2

3

4

5

6

$(‘#myModal').modal({

backdrop: ‘static',

//点击背景空白处不被关闭;

keyboard: false

//触发键盘esc事件时不关闭。

});

相关推荐:《bootstrap入门教程》

自定义模态框显示和关闭触发事件:

阅读剩余部分

相关阅读 >>

bootstrap layout it怎么使用

bootstrap的优缺点是什么?

bootstrap命令是什么意思

浅谈bootstrap表单验证插件bootstrapvalidator

jquery和bootstrap的区别是什么?

bootstrap怎么实现响应式布局

elementui和bootstrap区别

浅谈bootstrap中的panel布局

bootstrap怎么适配

bootstrap表单怎么居中

更多相关阅读请进入《bootstrap》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...