我遇到引导程序模式无法正常运行的问题,因为它在Safari和iOS上不应该运行。我已经在Stack Overflow中阅读了类似的问题,但是在图像中使用Modals找不到问题。有人可以提供一些见识和帮助吗?

<img alt="therapist" class="img-circle" data-target="#linda" data-toggle="modal" src="img/team/linda.png"> // modal opens when image is clicked
<h3 class="team--name" data-target="#linda" data-toggle="modal">Linda</h3>
<!-- Modal -->
<div aria-labelledby="myModalLabel" class="modal fade" id="linda" role="dialog" tabindex="-1">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">&times;</span></button>
                <h2 class="modal-title team--name" id="myModalLabel">Linda</h2>
                <h4 class="team--name">CAMTC</h4>
            </div>
            <div class="modal-body">
                <p>Linda brings compassion, positive energy and balance into her clients' lives</p>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success" data-dismiss="modal" type="button">Close</button>
            </div>
        </div>
    </div>
</div>


我尝试在图像内部实现下面的类,但无济于事。

.clickable {
    cursor: pointer;
}

最佳答案

案例固定。

我添加了以下脚本以将模式附加到主体。

$(document).ready(function () {
    $(".modal").appendTo("body");
});

09-25 16:46