浏览器缩放对齐解决方法 [英] Browser Zooming Misaligned Workaround

查看:442
本文介绍了浏览器缩放对齐解决方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,当用户放大,线不再排队恰好在某些情况下。不幸的是,我没有一个例子来说明,但我知道这与我缺乏的是如何缩放作品的理解去做。我认为这与东西放大时,像素有可能成为两个像素,因为单个像素老被绘制在两个新的像素一半,根据变焦如何影响像素定位类似的事情。

I have a website that when the user zooms, lines no longer line up exactly in some situations. Unfortunately, I don't have an example to show, but I know this has to do with my lack of understanding of how zooming works. I assume this has to do with things like when you zoom, a pixel may end up becoming two pixels because a single old pixel gets drawn on half of two new pixels, depending on how the zoom affects the pixel orientation.

是否有处理缩放上都非常准确地指定的网站的任何变通办法,因此,即使像素关是明显?

Are there any workarounds for dealing with zooming on websites that are very exactly specified, so even a pixel off is noticeable?

推荐答案

有很多浏览器的功能,可以有设计一个像素关比其他的放大是:

There are many browser features, that can have designs be "off by a pixel" other than zooming:

不同的可用字体,不同的字体渲染引擎,不同的舍入方法,不同的默认样式,浏览器的漏洞,所以这是不是真的单独缩放的问题。

Different available fonts, different font rendering engines, different rounding methods, different default styles, browser bugs, so this is not really a problem of zooming alone.

这是很难给出具体的建议,但恕我直言最好是与媒体的工作。

It's difficult to give specific suggestions, but IMHO the best is to "work with the medium".

此开始了与具有不是基于像素或就好像它是一个固定介质如纸上的原始设计 - 换句话说它与解释给客户/老板/设计师关于可能性开始,但也网页设计的极限。

This starts off with having the original design not based on pixels or as if it were a "fixed" medium such as paper - in other words it begins with the explaining to the customer/boss/designer about the possibilities, but also limits of web design.

有关你需要拥抱HTML / CSS的自然流的实际执行情况。避免明确的规格尺寸在任何你可以。更重要的是避免固定的高度和绝对定位。这是更好地使用一个表(preferably使用显示:表 - * 除非你有支持IE6),比使用绝对定位

For the actual implementation you need embrace "the natural flow" of HTML/CSS. Avoid explicit size specifications where ever you can. Most importantly avoid fixed heights and absolute positioning. It's better to use a table (preferably using display: table-* unless you have to support IE6) than using absolute positioning.

最好的是,如果你发布一个URL到您的网站,或者至少是一个示范页面,因为我敢肯定你的问题无关,与缩放和一切与呆板的设计。

Best would be if you posted a URL to your site, or at least an example page, because I'm sure your problem has nothing to do with zooming and everything with inflexible design.

这篇关于浏览器缩放对齐解决方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆