Fancybox模式在iframe

时间:2016-06-29 10:26:00

标签: iframe modal-dialog

Fancybox模式对话框在iPhone Safari中无效!有什么理由吗?

 <div class="m39-modal" data-component="m39-modal" id="modal_true">
    <button data-trigger="true" class="m39-modal__trigger">Modal Trigger</button>   
<div data-content="true" class="m39-modal__container" role="dialog" aria-expanded="false">
    <div class="m39-modal__dialog">
        <div class="m39-modal__header">
            <div class="m39-modal__title">Terms &amp; Conditions</div>
            <button data-close="true" class="m39-modal__button--close">Close</button>
        </div>
        <div class="m39-modal__content">

                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ut facilisis metus, varius elementum leo. Sed ut justo at magna pulvinar commodo non quis elit. Etiam cursus turpis sagittis sapien vulputate, sed sagittis nisi interdum. Suspendisse id neque non elit feugiat luctus. Aenean venenatis iaculis gravida. Nulla consectetur luctus neque ut fermentum. Fusce tellus risus, laoreet lacinia purus sed, tempor interdum nunc. </p><p>Phasellus in lorem justo. Ut rhoncus turpis at arcu dapibus, at lacinia lacus elementum. Donec elementum consectetur justo, non hendrerit augue dictum sit amet. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nam fringilla dui eget orci fermentum, vitae porttitor massa mollis. Duis luctus, eros quis vulputate convallis, sapien neque condimentum neque, vitae fermentum turpis sapien in ligula.</p><p>Phasellus iaculis odio a urna hendrerit, in iaculis odio ultricies. Nunc sed lacinia nulla. Vestibulum malesuada nunc id sapien volutpat luctus. Nam non fermentum metus. Nullam fermentum massa ut sem tristique, sed rhoncus leo vestibulum. Nullam egestas faucibus hendrerit. Duis risus felis, pulvinar eget risus in, dapibus varius metus. Vivamus turpis magna, sodales ut consequat at, auctor eu orci.</p>

        </div>
    </div>
</div>

你可以检查你的iPhone Safari中的代码,模态对话框不起作用,但在android上它确实如此。 If you tried to enter this link through your iphone with safari browser http://molham.ae/m39-modal.html

如果你点击(05)应该出现数字弹出窗口,如果你从桌面浏览器尝试它确实有效。

1 个答案:

答案 0 :(得分:-1)

我很确定问题必须与Safari如何处理转换有关。您可以在iframe加载的页面中添加以下css规则,看看是否可以修复错误吗?

var cd = campaigns.GroupBy (c => new {c.ID} ).Select (cp => new { cId= cp.Key.ID, TotalUsers = cp.Count(), TotalSum= cp.Sum( x=>x.UsersByCampaign) ... } ); var results = campaignList.ForEach( cl => cd.Where( cdd => cdd.cId == cl.Id) .Select(cdd => new { CampaignId = cdd.CId, TotalVisitors = cdd.TotalUsers , .. }) .DefaultIfEmpty( new { CampaignId = cdd.CId, TotalVisitors =0 , .. });