大佬教程收集整理的这篇文章主要介绍了twitter-bootstrap – Liferay中的Bootstrap模式,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我包括Bootstrap 2.3.2 javascript并试图使用我的模态窗口,但如果我想显示模态窗口它不会出现.我想问一下,我怎样才能在Liferay中显示原生引导模态.
.aui .hide { display: none !important; }
这会导致您的模态始终被隐藏.要解决这个问题,我建议避免使用hide类并添加style =“display:none;”对你的模态div这样:
<div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> <!-- Your modal HTML here... --> </div>
以下是上述代码的可运行示例.如果您想在门户网站中使用它,只需删除< link>正在加载bootstrap CSS的元素(它被注释包围).
<!-- The following link is not necessary in Liferay Portal 6.2 since bootstrap is loaded automatically --> <link href="//maxcdn.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css" rel="stylesheet"/> <!-- The above link is not necessary in Liferay Portal 6.2. --> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/2.3.2/js/bootstrap.min.js"></script> <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h2 id="myModalLabel">Header Header Header</h2> </div> <div class="modal-body"> <p>body body body</p> </div> </div> <button onclick="$('#myModal').modal();">Show</button>
以上是大佬教程为你收集整理的twitter-bootstrap – Liferay中的Bootstrap模式全部内容,希望文章能够帮你解决twitter-bootstrap – Liferay中的Bootstrap模式所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。