我如何通过Twitter的Bootstrap模式设置元素? [英] How can I set an element over Twitter's Bootstrap modal?
本文介绍了我如何通过Twitter的Bootstrap模式设置元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
< div id =editModalclass =modal这是我为Twitter的Bootstrap模式创建的基础HTML: hide fadetabindex = - 1role =dialogaria-labelledby =modalLabelaria-hidden =true>
< form class =form-horizontal updaterdata-type =undefineddata-id =undefined>
< div class =modal-header>
< button type =buttonclass =closedata-dismiss =modalaria-hidden =true>& times;< / button>
< h3 id =modalLabel>编辑内容< / h3>
< / div>
< div class =modal-body>< / div>
< div class =modal-footer>
< button type =submitclass =btn btn-primary>
< strong>保存更改< / strong>
< / button>
< button class =btndata-dismiss =modalaria-hidden =true>取消< /按钮>
< / div>
< / form>
< / div>
正如我的Firebug所说, modal
类有: z-index:1050
。我试图添加一个像这样的元素:
< div class =width:1000px height:200px; background:# f00; z-index:9999;> hi there< / div>
进入:
< div class =modal-body>< / div>
但它不起作用。
那么,如何在所有这些Bootstrap组件上设置一个元素?
解决方案
c $ c>< div class =width:1000px height:200px; background:#f00; z-index:9999;> hi there< / div> 尝试将属性 class
更改为样式
。
This is my base HTML for the Twitter's Bootstrap modal:
<div id="editModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="modalLabel" aria-hidden="true">
<form class="form-horizontal updater" data-type="undefined" data-id="undefined">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="modalLabel">Edit Content</h3>
</div>
<div class="modal-body"></div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">
<strong>Save Changes</strong>
</button>
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
</form>
</div>
As my Firebug says, the modal
class has: z-index: 1050
. I was trying to add an element like this:
<div class="width: 1000px height: 200px; background: #f00; z-index: 9999;">hi there</div>
Into the:
<div class="modal-body"></div>
But it doesn't work.
So, how can I set an element over all these Bootstrap components?
解决方案
You have given inline style for class attribute <div class="width: 1000px height: 200px; background: #f00; z-index: 9999;">hi there</div>
. Try Changing attribute class
to style
.
这篇关于我如何通过Twitter的Bootstrap模式设置元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文