jquery - firefox 上的 z-index - Internet Explorer 不工作。 Bootstrap 模态

标签 jquery html css twitter-bootstrap z-index

我有一个带有 jquery 日期选择器的 Bootstrap 模式。

日期选择器具有这种风格:

.datepicker{ z-index:1000;}

在 google chrome 上运行良好,它看起来像这样:

enter image description here

在 Internet Explorer 10/Firefox 中看起来像这样

enter image description here

这是模态 html:

<div name="fechaAprobacionModal<?php echo $i; ?>" id="fechaAprobacionModal<?php echo $i; ?>" class="modal hide fade" 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">X</button>
    <h4 id="myModalLabel">Indicar Aprobaci&oacute;n de Facturas de Programas Especiales </h4>
  </div>
  <div class="modal-body">

            <p> <div class="texto_importante" style="margin-top:4px;"> Fecha Aprobaci&oacute;n: </div>  

                <div class="input-prepend">
                  <span class="add-on"><i class="icon-calendar"></i></span>

                   <input type="text" id="fechaid<?php echo $i; ?>" value="<?php echo date('Y-m-d') ?>"/>
                </div>

            </p>

  </div>
  <div class="modal-footer">
    <button class="btn btn-small" data-dismiss="modal" aria-hidden="true">Cerrar</button>
    <button class="btn btn-small btn-info" id="guardar<?php echo $i; ?>">Guardar</button> 
  </div>
</div>

关于如何解决这个问题的任何提示?

最佳答案

我做了以下事情:

<div class="input-prepend" style="z-index:4000;">

    <span class="add-on"><i class="icon-calendar"></i></span>
    <input style="z-index:2000;"  type="text" name="fecha_culminacion" id="fechaid<?php echo $i; ?>" value="<?php echo date('Y-m-d') ?>"/>

</div>

我给了父元素一个更高的 z-index。

我在这里找到了解决方案:internet explorer z-index bug

关于jquery - firefox 上的 z-index - Internet Explorer 不工作。 Bootstrap 模态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19790342/

相关文章:

javascript - 如何根据边距样式创建 If Else 条件

html - 需要帮助找到在数据表中应用 css 样式的正确位置

html - 灵活的 css 布局,在容器内带有页眉、页脚和滚动体

html - 包含图像的通讯 - 移动设备上的图像之间有空格

javascript - 使用 AngularJS 自定义可过滤下拉菜单

javascript - JQuery 不附加 html

javascript - 使用 jquery 单击输入类型按钮时如何更改 Canvas 背景图像?

jquery - Jw玩家: want to play mp3 audio in jw html5 player with prev/next navigation

javascript - CSS 边距和填充问题

html - CSS 只获取文本