开发者

Can I use HTML/CSS to load my webpages at a zoom % other than 100%?

First of all, I apologise if my question is silly - I just started learning html/css recently

I have finished my first site and now realise that everything is a little bit too big. I was wondering if i开发者_运维知识库t is possible to tell the browser using html or css (or anything else for that matter) to load a page zoomed out by say 10%, rather than at 100% size.


Sorry, I don't think that's possible in any browser.

Even if it's possible for just any one browser (don't believe it is), it's certainly not possible for all of them.

Also, even if it were possible, it could cause you problems in the future if you did it.

For example:

  • Images might not look precisely correct (due to resizing).
  • If you were using pixel fonts, they'd look wrong.
  • Anything using Flash might not scale properly.

You'll have to do it the slow way - change all the sizes and generally rejig everything around.


You can do with JavaScript but it's a bad road to start down (fixing HTML/CSS with JavaScript). It really depends what elements are on the page though, if it's mainly text then defining a font rule in CSS for the body tag is good practise and can make adjusting text sizes very easy. It's difficult to answer though without some code or a screenshot

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜