Home  >  Article  >  Web Front-end  >  Why is my CSS3 Transform Rotating Menu Items in Firefox but not Chrome or Safari?

Why is my CSS3 Transform Rotating Menu Items in Firefox but not Chrome or Safari?

Mary-Kate Olsen
Mary-Kate OlsenOriginal
2024-10-28 06:31:02984browse

Why is my CSS3 Transform Rotating Menu Items in Firefox but not Chrome or Safari?

CSS3 Transform Not Functioning:

You're attempting to rotate menu items by 10 degrees, and your CSS funktioniert in Firefox. However, replicating this effect in Chrome and Safari has proven unsuccessful.

CSS Used:

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

Potential Causes:

  • Display Property: Ensure that display: block or display: inline-block has been applied to li a. This ensures that the elements are rendered as blocks and thus can be transformed correctly.
  • Target Element: If the above solution doesn't resolve the issue, try applying the CSS3 transform rules to li instead of li a.

The above is the detailed content of Why is my CSS3 Transform Rotating Menu Items in Firefox but not Chrome or Safari?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn