gpt4 book ai didi

javascript - Twitter Bootstrap 模态

转载 作者:行者123 更新时间:2023-12-02 19:33:00 26 4
gpt4 key购买 nike

模态 javascript 插件工作正常。我有一个关于图书馆本身的问题。

如果您注意到此链接

http://twitter.github.com/bootstrap/javascript.html#modals
// click on LAUNCH DEMO MODAL

模态从屏幕顶部下降到屏幕垂直中心。这个功能是插件中提供的还是我必须自己编写的 javascript?

谢谢。

最佳答案

fade 类添加到模式中以获得此转换。

你的 html 应该看起来像这样

<div id="myModal" class="modal hide fade">
<div class="modal-header"></div>
<div class="modal-body"></div>
<div class="modal-footer"></div>
</div>

<a data-toggle="modal" href="#myModal" class="btn btn-primary">Launch Modal</a>

在 JsFiddle 上查看它的实际情况 here

来自documentation :

Heads up! If you want your modal to animate in and out, just add a .fade class to the .modal element (refer to the demo to see this in action) and include bootstrap-transition.js.

关于javascript - Twitter Bootstrap 模态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11285243/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com