Can I zoom into a web page like IE or Firefox do, using programming?

后端 未结 3 1988
天命终不由人
天命终不由人 2020-12-10 22:54

Simple - I have a layout that is 800 by 600. When I press Ctrl and +, it zooms in and looks wonderful.

I want to know if there\'s a CSS/Javascript way to do the same

3条回答
  •  有刺的猬
    2020-12-10 23:20

    Not all designs (in fact I'd wager, none, without targeted style sheets) can cope with the vastly different sizes of screen out there today, from portrait orientated screens at public libraries, to ultra fine artworking Macs with giant landscape screens and tiny little laptops - the latter two often used by executives that have NO understanding of how the zoom features in a browser work and also often have terrible eye sight and little patience.

    My suggestion is to use relative sizing like Marcgg suggests. If you're really looking to be super flexible the you could use javascript or browserhawk (or equivalent) to measure the screen sizes and switch out style sheets for those that are really not going to work with your layout.

提交回复
热议问题