Home >Web Front-end >Bootstrap Tutorial >Regarding the hidden problem of bootstrap model
How to hide the bootstrap model: first introduce the file environment of boostrap and Jquery; then add a large div; finally hide the modal box by setting the "aria-hidden" attribute.
The operating environment of this tutorial: Windows 7 system, bootstrap version 3. This method is suitable for all brands of computers.
Recommended: "bootstrap video tutorial"
About boostrap’s modal hidden problem (front-end framework)
First, introduce the file environment of boostrap and Jquery:
0f3e7b0da20971af6119fadbde6a2b3c b72b6d857828839b3daa98f056d2b8122cacc6d41bbb37262a98f745aa00fbf0 f49b5b212717d4b256798434be5329872cacc6d41bbb37262a98f745aa00fbf0
Usually a button or link triggers the modal
e0279a115e9482989f7cd173365c28be开始演示模态框65281c5ac262bf6d81768915a4a77ac0a98392ec65c6437d6e4b9996f54b3546
First add a large div, fade: fade in and fade out effect aria- hidden is to hide the modal box
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true")
Then under modal-content, insert modal-header, modal-body, modal-footer
<div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title" id="myModalLabel">模态框(Modal)标题</h4> </div> <div class="modal-body">在这里添加一些文本</div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button> <button type="button" class="btn btn-primary">提交更改</button> </div> </div><!-- /.modal-content -->
× which is the symbol of X, Click Close or x or click "Ese" to exit the modal box
If you want to click to submit changes and exit the modal box, you can add an onclick event and add $ in the script ("#myModal").modal("hide"); as follows
44728e4e1c1044725e986ada72868032提交更改65281c5ac262bf6d81768915a4a77ac0
function user_del(){ $("#user").modal('hide'); }
The above is the exit function problem. As for the pop-up modal box, you can write a series of form-groups in the modal-body. Input box group, for details, please go to boostrap's official website to view the input box group. The code effect is as follows:
The above is the detailed content of Regarding the hidden problem of bootstrap model. For more information, please follow other related articles on the PHP Chinese website!