div with font size independent from viewport / zoom
I'm building开发者_开发百科 a bookmarklet that needs to have it's font sizes independent of the viewport or zoom level of the current page (when the javascript is injected).
What happens now (on tablets + phones mainly) is that the fonts are too small when the page fits the mobile viewport (or really small zoom levels on a PC browser).
Here's a screen grab:
http://i.stack.imgur.com/liO0C.png
Does anyone know a way to do this? Javascript or CSS solutions are great by me.
Thanks!
Sean
Check This -
Preserve HTML font-size when iPhone orientation changes from portrait to landscape
Load mobile CSS if user is on Android
Even you can have Javasacript -
<script>
if ((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))
{
var t= '';
document.write('<link href=http://..../.../your.css media=all rel=stylesheet type=text/css />');
}
</script>
Tutorial Site :
http://css-tricks.com/snippets/javascript/redirect-mobile-devices/
http://www.gethifi.com/blog/three-ways-to-target-mobile-devices
精彩评论