问题
Is there alternative on android? I know that i can create style file for each screen density and size and change font size there.
But providing single relative/auto scalable value, like it does in css would be awesome.
I'm surprised that android doesn't have it, as well as svg drawables support only in latest api...
Thank you.
回答1:
VW should work with percentages. VH won't work. The only solution i came up with, is to write a JS for this. Just measure the VH and if Android use the calculated pixels instead of VH.
Playing with percentages, calc, etc. didn't solve it for me.
来源:https://stackoverflow.com/questions/27602691/android-css-font-size-vw-vh-responsive-alternative