PhoneGap on iOS with absolute path URLs for assets?

前端 未结 3 549
难免孤独
难免孤独 2020-12-05 18:11

Porting a web app to phoneGap on iOS, we have asset (and ajax) URLs that are absolute paths, e.g.:


We hav

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-05 18:25

    When checking the absolute path through your iPhone/iPad you would see something like this:

    
    

    And it will be different on Android or Windows devices so I don't think it's actually a good idea to reference assets using absolute paths in this case.

    As an alternative you could consider using the base64 strings in your CSS files:

    div#overview
    {
        background-image: url('data:image/jpeg;base64, ');
        background-repeat: no-repeat;
    }
    

提交回复
热议问题