简体   繁体   English

模态不从顶部滑动

[英]modal not sliding from top

I implemented the bootstrap model in my website..... the model is working fine but the model does not slide from top exactly like the actual bootstrap model.... How to fix it.... 我在网站上实现了引导程序模型.....该模型运行良好,但是该模型无法像实际的引导程序模型一样从顶部滑动....如何修复....

Actual model 实际型号

http://jsfiddle.net/nJ6Mw/1/ http://jsfiddle.net/nJ6Mw/1/

model not sliding from top 模型未从顶部滑落

http://jsfiddle.net/y88WX/embedded/result/ http://jsfiddle.net/y88WX/embedded/result/

<div id="example" class="modal hide fade in" style="display: block;" aria-hidden="false">
    <div class="modal-header"> <a class="close" data-dismiss="modal">×</a>
        <h3>This is a Modal Heading</h3>
    </div>
    <div class="modal-body">
        <h4>Text in a modal</h4>
        <p>You can add some text here.</p>
    </div>
    <div class="modal-footer"> <a href="#" class="btn btn-success">Call to action</a>
        <a href="#" class="btn" data-dismiss="modal">Close</a>
    </div>
</div>

You have got way too many resources conflicting in the fiddle that you're trying to get working, this fiddle works, so if you can put this code into the page that you're trying to load it into and it doesn't work, you know the problem isn't your bootstrap, also, please send a link to the page you're having problems with, please don't send a fiddle with many different resources attached. 您在尝试使用的小提琴中有太多资源冲突,这种小提琴有效,因此,如果您可以将此代码放入要加载到的页面中而无法使用,您也知道问题不在于您的引导程序,请发送链接到您遇到问题的页面,请不要发送带有许多其他资源的小提琴。

You need to define options for the modal via javascript: 您需要通过javascript定义模式选项:

$(function() {
    $('#event-modal').modal({
        backdrop: true;
    });
});

Placing all css and links/html from the site directly into fiddle is not easy for someone to jump into and debug for you. 将网站上的所有css和links / html直接放入小提琴对于某人来说,进入并调试您并不容易。

http://jsfiddle.net/sfWBT/1/ http://jsfiddle.net/sfWBT/1/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM