1

I was trying to implement this into a header on a page I'm putting together, but I had no luck getting it working. My hovers were working fine, as I tried another change on them (not the transform) and there were no issues there. But the transform itself doesn't do anything.

I couldn't figure out what was going on, so I just straight copy-pasted the HTML & CSS into a new file, and the hovers aren't working there either. What could be going wrong? It's working fine in my browser on CodePen, but not when copy/pasted out.

1
  • On codepen he's using prefix-free, maybe you need to include all prefixes? If you are unsure, paste your css into this website http://prefixr.com/ and then copy the result. Commented Oct 28, 2013 at 16:04

1 Answer 1

1

In this particular example, Codepen has automatically applied vendor prefixes to certain CSS properties. In the case of transform, Chrome, Safari, Opera, and Android all require the -webkit- prefix and old versions of IE require the -ms- prefix (as listed here).

This means that where you're using properties like transform, transform-style, transform-origin, perspective and transition, you'll also need to implement the vendor prefixed versions.

For example:

.letter {
    ...
    transform-style: preserve-3d;
    ...
}

Will need to be changed to:

.letter {
    ...
    -webkit-transform-style: preserve-3d;
    -ms-style: preserve-3d;
    transform-style: preserve-3d;
    ...
}
Sign up to request clarification or add additional context in comments.

3 Comments

Codepen doesn't automatically apply them, you need to enable them in settings and then they are automatically applied to your future pens. So the guy who created this obviously had that option on. :)
@BeatAlex good shout! I've modified the beginning of my answer.
Could tell that by you using 'good shout', you're British. Not relevant, but still awesome.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.