2012-10-03 99 views
1

我复制的代码从给出的例子一模一样不是隐藏:引导:Twitter的引导模态时,页面加载

<-- Button to trigger modal --> 
<a href="#myModal" role="button" class="btn" data-toggle="modal">Launch demo modal</a> 

<-- Modal --> 
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> 
<div class="modal-header"> 
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> 
<h3 id="myModalLabel">Modal header</h3> 
</div> 
<div class="modal-body"> 
<p>One fine body…</p> 
</div> 
<div class="modal-footer"> 
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> 
<button class="btn btn-primary">Save changes</button> 
</div> 
</div> 

http://twitter.github.com/bootstrap/javascript.html#modals 

当页面第一次加载时,模态表现立即开始。我没有JavaScript来触发它。他们网站上的现场演示并不像这样。有什么遗漏?

回答

6

hide类添加到您的模态。

更新在B3中,模态已经完全改造。你不应该需要这个班。

如果仍然显示,请确保您在HTML中使用正确的语法。它应该默认隐藏。

+0

这是有效的。谢谢。他们是否想要更新他们的文档?他们给出的例子和现场演示的行为有所不同。 – user926958

+1

游戏后期,但想输入。语法是我的问题。在第一个div中,我有class =“modal-fade”而不是class =“modal fade”。其他类有 - ,所以我想我只是把它扔到那里。 – WreithKassan