开发者

div with font size independent from viewport / zoom

开发者 https://www.devze.com 2023-04-04 12:08 出处:网络
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).

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 -

  1. Preserve HTML font-size when iPhone orientation changes from portrait to landscape

  2. 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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号