How to fix CSS3 transform not working?

Spread the love

Sometimes, we want to fix CSS3 transform not working.

In this article, we’ll look at how to fix CSS3 transform not working.

How to fix CSS3 transform not working?

To fix CSS3 transform not working, we should make the element a block or inline-block element.

For instance, we write

li a {
  display: block;
  -webkit-transform: rotate(10deg);
  -moz-transform: rotate(10deg);
  -o-transform: rotate(10deg);
}

to make the a elements in li elements block elements with display: block;.

Then we apply the transform style to it to rotate each element by 10 degrees.

Conclusion

To fix CSS3 transform not working, we should make the element a block or inline-block element.

Leave a Reply

Your email address will not be published. Required fields are marked *