views:

99

answers:

1

If I set the CSS position attributes of an image element to floating points via javascript, Firefox renders it nicely, but other browsers do not. Can I get sub pixel positioning to work with other browsers? I like to seamlessly zoom in on an image, without jittering due to my values getting rounded off. For example, it seems like 2.217px; becomes '2px;' in all browsers except for Firefox. This happens with setting the value via style.top or via style.webkit-transform: translate(x, y).

A: 

In the end, I've managed this by drawing the image on the HTML5 canvas element.

Monokai