android - Viewport Units not working in Cordova Mobile App -
i'm trying responsive web design app adapts multiple screens. hence used viewport units(vw , vh) in css every thing font-size margin. cordova webview not supporting viewport units. i'm stuck here.
is there way workaround vh , vw units work on cordova webview? or there other way of getting responsive web design app can release across multiple screens(android).
thanks in advance.
i got js workaround works fine in cordova app
code:
var w=$(window).width()/100; var h=$(window).height()/100; function vw( val ) { return w*val+'px'; } function vh( val ) { return h*val+'px'; } $('.header p').css({ fontsize: vw(4), margintop: vh(2) });
simple isn't it?
Comments
Post a Comment