How to rotate image on Ivs

Asked

Viewed 13,322 times

0

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

inserir a descrição da imagem aqui

How do I do this in CSS?

3 answers

8


I resolved so:

.vertical-img {
transform: rotate(90deg);
transform-origin: left top 0;
}

5

Utilize vendor prefixes for greater compatibility of the property Transform.

According to the Can i use, currently you need to use epenas -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">

-1

just put it that way in your Style that works,

.vertical-img {
  transform: rotate(90deg);
}

more to ensure that it will work in all browsers use the so:

.vertical-img {
   -webkit-transform: rotate(90deg);
   -ms-transform: rotate(90deg);
    transform: rotate(90deg);
 }
  • What is the purpose of your answer

Browser other questions tagged

You are not signed in. Login or sign up in order to post.