IanLunn / Hover

A collection of CSS3 powered hover effects to be applied to links, buttons, logos, SVG, featured images and so on. Easily apply to your own elements, modify or just use for inspiration. Available in CSS, Sass, and LESS.
http://ianlunn.github.io/Hover/
Other
29.25k stars 5.78k forks source link

Curious about something #99

Closed batusai513 closed 8 years ago

batusai513 commented 8 years ago

Hi, this is not really an issue, is just curiosity about the background transitions, i was wondering why the before pseudo element is visible if you are using a negative z-index, i see that you are using a transformZ, but i want to know the why of this behavior, if you also have articles or something where i can go deep on this it would be awesome.

thanks

IanLunn commented 8 years ago

It is due to stacking context. A couple of good articles:

The transformZ is for the purpose of hardware acceleration, however, this also creates a stacking context (which I don't think is mentioned in Philip Walton's article).