Using CSS, how can I apply more than one transform?
Example: In the following, only the translation is applied, not the rotation.
li:nth-child(2) {
transform: rotate(15deg);
transform: translate(-20px,0px);
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You have to put them on one line like this:
When you have multiple transform directives, only the last one will be applied. It’s like any other CSS rule.
Keep in mind multiple transform one line directives are applied from right to left.
This:
transform: scale(1,1.5) rotate(90deg);and:
transform: rotate(90deg) scale(1,1.5);will not produce the same result: