iOS does not support IFRAME solutions

Source: Internet
Author: User

In the outer layer of the IFRAME, the contents are added to the container through AppendChild (), the complete code is as follows:

1 @section Css2     {3<link href= "@ViewHelper. Content ("/content/css/mobiscroll.css ")" rel= "stylesheet" type= "Text/css"/>4<link href= "@ViewHelper. Content ("/content/css/common.css ")" Rel= "stylesheet"/>5 }6 <style>7 . Frame {8 margin-top:55px;9 padding:10px;Ten HEIGHT:90VH; One WIDTH:100VW; A Border:none; -     } - </style> the<div id= "Iframe-box"> -<iframe id= "Ifram" class= "frame" width= "420" height= "src=" @ViewBag. Pathurl.replace ("http://", "https://") "></iframe> - </div> - @section js{ + <script> - var ifram = document.getElementById (' Ifram '); + if (Navigator.userAgent.match (/ipad|iphone/i)) { A var iframe_box = document.getElementById (' Iframe-box '); at iframe_box.style.width = + '% '; - Iframe_box.style.overflowX = ' hidden '; - Iframe_box.style.overflowY = ' scroll '; - iframe_box.style.webkitOverflowScrolling = ' touch '; - ifram.setattribute (' scrolling ', ' no '); - Iframe_box.appendchild (ifram); in         } - </script> to}

iOS does not support IFRAME solutions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.