Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 防止Modal在移动设备上上上下移动? ❮ ❯_Css_Bootstrap 4 - Fatal编程技术网

Css 防止Modal在移动设备上上上下移动? ❮ ❯

Css 防止Modal在移动设备上上上下移动? ❮ ❯,css,bootstrap-4,Css,Bootstrap 4,我正在使用一个引导手机制作一个灯箱画廊。在手机上,当用户刷卡时,模式会上下跳跃。如何修复它?您可以尝试修复它在特定于移动视图的媒体查询中的位置: <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="

我正在使用一个引导手机制作一个灯箱画廊。在手机上,当用户刷卡时,模式会上下跳跃。如何修复它?

您可以尝试修复它在特定于移动视图的媒体查询中的位置:

<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-dialog-centered justify-content-center" id="modalInner" role="document">
    <div id="innerContentWrapper">
      <a class="prev">&#10094;</a>
      <a class="next">&#10095;</a>

      <div id="innerContent"></div>
    </div>
  </div>
</div>
@media only screen and (max-width : 768px) {
 .modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  }
}