Full Page <iframe>

前端 未结 5 1604
我寻月下人不归
我寻月下人不归 2020-12-22 16:32

I have the example code below. This works fine with all browsers except for browsers on mobile devices.

The overflow tag is the issue.

Works with all except

5条回答
  •  醉酒成梦
    2020-12-22 17:22

    For full-screen frame redirects and similar things I have two methods. Both work fine on mobile and desktop.

    Note this are complete cross-browser working, valid HTML files. Just change title and src for your needs.
    You may consider dropping if you don't have non-ASCII characters.

    1. this is my favorite:

    
    
     Title-1 
    
    
    
    
    
    

    or 2. something like that, slightly shorter:

    
    
     Title-2 
    
    
    


    Note:
    To be conservative the above examples avoid using height:100vh because old browsers don't know it (maybe moot these days) and height:100vh is not always equal to height:100% on mobile browsers (probably not applicable here). Otherwise, vh simplifies things a little bit, so

    3. this is an example using vh (not my favorite, less compatible with little advantage)

    
    
     Title-3 
    
    
    
    

提交回复
热议问题