How to rotate image in divs

-1

I have a page with 3 divs. One of them always receives images, I would like all images to remain in this position:

How do I do this in CSS?

    
asked by anonymous 16.10.2015 / 04:16

2 answers

6

I solved it like this:

.vertical-img {
transform: rotate(90deg);
transform-origin: left top 0;
}
    
16.10.2015 / 04:24
5

Use < in> vendor prefixes for greater compatibility of the transform property.

According to the Can i use , you currently need to use -webkit, -ms and the property itself.

Example:

.vertical-img {
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}
<img src="" alt="Desc Imagem" class="vertical-img">
    
16.10.2015 / 13:51