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)
.
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
In the end, I've managed this by drawing the image on the HTML5 canvas element.