I want to rotate the image which is placed in the button of scrollbar in Chrome. Now I have a CSS with this content:
::-webkit-scrollbar-button:vertical:decrement
{
background-image:url(images/arrowup.png) ;
-webkit-transform:rotate(120deg);
-moz-transform:rotate(120deg);
background-repeat:no-repeat;
background-position:center;
background-color:#ECEEEF;
border-color:#999;
}
I wish to rotate the image without rotating its content.
In my case, the image size is not so large that I cannot have a rotated copy of it. So, the image has been rotated with
photoshop
. An alternative tophotoshop
for rotating images is online tool too for rotating images. Once rotated, I'm working with therotated-image
in thebackground
property.Good Luck...
Very easy method, you rotate one way, and the contents the other. Requires a square though
I was looking to do this also. I have a large tile (literally an image of a tile) image which I'd like to rotate by just roughly 15 degrees and have repeated. You can imagine the size of an image which would repeat seamlessly, rendering the 'image editing program' answer useless.
My solution was give the un-rotated (just one copy :) tile image to psuedo :before element - oversize it - repeat it - set the container overflow to hidden - and rotate the generated :before element using css3 transforms. Bosh!
CSS:
Javascript:
PS: I've found this somewhere else but don't remember the source
Very well done and answered here - http://www.sitepoint.com/css3-transform-background-image/