Skip to content

Instantly share code, notes, and snippets.

@Kcko
Last active August 29, 2015 14:15
Show Gist options
  • Save Kcko/17c9abadb094d877c2f3 to your computer and use it in GitHub Desktop.
Save Kcko/17c9abadb094d877c2f3 to your computer and use it in GitHub Desktop.
Fígl na hover efekt (pomocí shadow-text)
// ----
// Sass (v3.4.12)
// Compass (v1.0.3)
// ----
a
{
text-decoration: none;
position: relative;
&:before
{
position: absolute; top: 100%; left: 50%; color: rgba(0, 0, 0, 0); content: '€'; text-shadow: 0 0 rgba(0, 0, 0, 0); font-size: 0.7em; -webkit-transition: text-shadow 0.3s, color 0.3s; -moz-transition: text-shadow 0.3s, color 0.3s; transition: text-shadow 0.3s, color 0.3s; -webkit-transform: translateX(-50%); -moz-transform: translateX(-50%); transform: translateX(-50%); pointer-events: none;
}
}
a:hover:before
{
color: #373737;
text-shadow: 20px 0 red, 10px 0 red, -10px 0 red, -20px 0 red;
}
@charset "UTF-8";
a {
text-decoration: none;
position: relative;
}
a:before {
position: absolute;
top: 100%;
left: 50%;
color: transparent;
content: '€';
text-shadow: 0 0 transparent;
font-size: 0.7em;
-webkit-transition: text-shadow 0.3s, color 0.3s;
-moz-transition: text-shadow 0.3s, color 0.3s;
transition: text-shadow 0.3s, color 0.3s;
-webkit-transform: translateX(-50%);
-moz-transform: translateX(-50%);
transform: translateX(-50%);
pointer-events: none;
}
a:hover:before {
color: #373737;
text-shadow: 20px 0 red, 10px 0 red, -10px 0 red, -20px 0 red;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment