Why does a simple rotate make an image blurry?
Looking to rotate an image 90deg, but the resulting image is unacceptably blurry.
transform: rotate(90deg);
This is the same in both Firefox and Chrome (haven't checked other browsers).
Here is a JSFiddle link:
http://jsfiddle.net/6d2GT/1/
Are there any workarounds/tricks to minimize the blurring?
--
In case it's computer specific, an image link http://i.imgur.com/WzXkRL9.png
The transform property applies a 2D or 3D transformation to an element. This property allows you to rotate, scale, move, skew, etc., elements.
Rotating an image using CSS Once the CSS code is applied to your . css file, stylesheet, or <style> tags, you can use the CSS class name in any of your image tags. To rotate an image by another measure of degrees, change the "180" in the CSS code and <img> tag to the degree you desire.
We can add the following to a particular tag in CSS: -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -o-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); In case of half rotation change 90 to 45 .
You could use the following :
#pic {
-webkit-transform: rotate(90deg) translatez(0);
transform: rotate(90deg) translatez(0);
margin-top: 50px;
-webkit-transform-origin: 50% 51%;
}
An example: http://jsfiddle.net/6d2GT/2/
don't forget the needed prefixes
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With