Safari / iOS / iPhone上的Bootstrap模式问题 [英] Bootstrap modal issue on Safari/iOS/iPhone

查看:366
本文介绍了Safari / iOS / iPhone上的Bootstrap模式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Bootstrap模态淡入在Chrome / Internet Explorer上正常工作,但它不适用于iPhone / Safari。有人解决这个问题吗?

Bootstrap modal fade is working perfectly on Chrome/Internet Explorer, but it doesn't work on the iPhone/Safari. Does someone a solution for this issue?

<div class="modal fade" id="notice" tabindex="-1" role="dialog" aria-labelledby="notice" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <img src="https://random.hellyer.kiwi/files/2013/11/wiley-coyote-help.jpg" />
                | wait, I'm updating...
            </div>
        </div>
    </div>
</div>

<script>
    $('#notice').modal('show');
    setTimeout(function () {
        $('#notice').modal('hide');
    }, 3000);
</script>

https://jsfiddle.net/mmbtfhaf/

推荐答案

我现在也有同样的问题,想出来,在iOS上的safari在工作方式不同于其他浏览器一个事情。模式窗口不会在Safari浏览器上显示,但在许多其他浏览器上却没有显示href =#。

I had the same problem these days and figured out, that safari on iOS is working differently to other browsers with respect to one thing. The modal window is not shown on safari but on many other browsers, when there is a href="#" missing.

无法在Safari / iOS上使用,

not working on Safari/iOS but other browsers:

< li>< a data-toggle =modaldata-target =#testModal> Modal< / a> < / li>

可在Safari / iOS和其他浏览器上使用:

working on Safari/iOS and other browsers:

< li>< a href =#data-toggle =modaldata-target =#testModal> Modal< / a>< / li>

这篇关于Safari / iOS / iPhone上的Bootstrap模式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆