Several problems encountered in mobile terminal development

Source: Internet
Author: User

1.iPhone the non-a-label using $.fn.on delegate binding has no effect.

Handling scenarios, adding cursor properties to tags

. event{    Cursor:pointer;}

2. The mobile side uses the IFRAME to load the cross-domain Web page that appears "refused to display in a frame becuase it set ' x-frame-options ' to ' Sameorigin"

I use the cross-domain page is the mobile official website "http://wap.10086.cn/", if you use the PC address "http://www.10086.cn/" will not occur this issue.

  cause : For security reasons, some websites block calls to external IFRAME, such as the mobile Web wap above, and the mobile PC side is not blocked.

  Solution :

Find solutions on the web, but not really useful. There are several ways to be considered feasible by netizens, but I do not use here, see http://stackoverflow.com/questions/20498831/ Refused-to-display-in-a-frame-because-it-set-x-frame-options-to-sameorigin

If the front-end support, this should be no solution, after all, the page to visit is not their own. the only way to do this is to get back-office colleagues to help open the site using the default browser.

3. WebView Sumsung phone using Margin-left:auto;margin-right:auto; To achieve horizontal centering causes the width setting of the center element to be invalidated, and the width automatically fills the center area.

Solution: Position + left distance 50%+ half of the left offset element width

. center{position:relative;left:50%;margin-left:-100px;}

4.webview Sumsung defined height does not work

Solution: Forced to use padding prop height

5.webview Sumsung Margin-left does not work

Solution: Forced to use Padding-left

Several blog posts are recommended:

  Some things to note about mobile development

  Some pits and workarounds for mobile Front end (appearance)

  

Several problems encountered in mobile terminal development

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.