简体   繁体   English

自举模态框内容

[英]Bootstrap Modal Box content

I'm using a modal box to display my advertising work for my portfolio. 我正在使用模式框来展示我的投资组合的广告作品。 The modals are functioning properly for the most part, but it seems like the content within the modals is blocking my navbar at the top. 模态在大多数情况下都正常运行,但是模态中的内容似乎在顶部阻塞了我的导航栏。

Without dynamically loading the content, is there a way to make the content of the modals not interfere with the navbar? 如果不动态加载内容,是否有一种方法可以使模式内容不干扰导航栏? I tried giving the navbar a higher z-index, but that didn't seem to do the trick. 我试图给导航栏更高的z索引,但这似乎并没有解决问题。 I gave the modal content as well as the modal.backdrop a lower z-index, but nothing seems to be doing the trick. 我为模态内容以及modal.backdrop赋予了较低的z-index,但似乎没有任何办法。

Here is a link to the page: http://0034191.netsolhost.com/ryancurtis/advertising.html 这是页面的链接:http: //0034191.netsolhost.com/ryancurtis/advertising.html

This might by an easy fix, but I've tried everything within my skill set. 这可能是一个简单的解决方法,但是我已经尽力尝试了所有技能。 I'm pretty new to bootstrap. 我是新手。

Don't make the dialog modal. 不要使对话框成为模态。 You can still pop-up the dialog, but don't make it modal. 您仍然可以弹出对话框,但不要使其成为模式对话框。 Modal prevents the user from seeing/interacting with what lies beneath. 模态可防止用户看到下方的内容/与其进行交互。

It's easier to see the distinction via this example from the jQueryUI dialog (a very similar system). 通过这个示例,可以从jQueryUI对话框(一个非常相似的系统)中看出区别。

I'm not fluent with bootstrap, but it appears that you would make your dialog an alert rather than a model. 我不太懂引导程序,但是看来您将使对话框成为警报而不是模型。

Note that you can mix/intermingle bootstrap with jQueryUI if you wished to do so. 请注意,如果您愿意,可以将引导程序与jQueryUI混合/混合。 They both run on top of jQuery, just include both libraries. 它们都运行在jQuery之上,只包含两个库。

why dont u give padding/top margin for modal? 为什么不给模态填充/上边距? i guess its simplest solution.. 我想这是最简单的解决方案。

<style>
.modal {            
margin-top:50px;
}
</style>

or with JS 或与JS

<script>    
{
    $("#myModal").animate({"width":"1100px","left":"30%"},3000,'easeInCirc');
}
</script> 

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

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