Progress Hover
Link changes color on hover in curious way.
Link changes color on hover in curious way.
<section>
<section>
<h1>
<a href="#" class="nice-link">Hover me, please</a>
</h1>
<p>
Lorem ipsum dolor sit amet, consectetur <a href="#" class="nice-link">adipiscing</a> elit fusce vel sapien elit in malesuada semper mi,
id sollicitudin urna fermentum ut fusce varius nisl ac ipsum gravida vel pretium tellus.
Lorem ipsum dolor sit amet, <a href="#" class="nice-link">consectetur</a> adipiscing elit fusce vel sapien elit in malesuada semper mi,
id <a href="#" class="nice-link">sollicitudin urna fermentum ut fusce</a> varius nisl ac ipsum gravida vel pretium tellus.
</p>
</section>
<footer>
<a id="dex-sign" href="http://drygiel.com" target="_blank"></a>
</footer>
<script class="cssdeck" src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
a.nice-link {
a.nice-link {
#262626;:
#168dff;:
50%), -8), 8%);: lighten(spin(saturate( ,
position: relative;
color: ;
h1 &:after {
border-bottom: 1px solid ; // Underline
}
&:after {
text-align: justify;
display: inline-block;
content: attr(data-text);
position: absolute;
left: 0;
top: 0;
white-space: nowrap;
overflow: hidden;
color: ;
min-height: 100%;
width: 0;
max-width: 100%; // 'cause of IE bug
background: ;
-moz-transition: .3s;
-o-transition: .3s;
-webkit-transition: .3s;
transition: .3s;
}
&:hover {
color: ; // To override default hover color
&:after {
width: 100%;
}
}
}
//_____________ PAGE
http://fonts.googleapis.com/css?family=Open+Sans:300);url(
* {
margin: 0;
padding: 0;
-moz-box-sizing: padding-box;
-webkit-box-sizing: padding-box;
box-sizing: padding-box;
}
body, html {
color: #dedede;
height: 100%;
background: #262626;
font: 300 130% 'Open Sans',sans-serif;
-webkit-font-smoothing: antialiased;
}
::selection {
background: #90bbff;
}
::-moz-selection {
background: #90bbff;
}
a {
text-decoration: none;
color: #168dff;
&:hover {
color: #90bbff;
}
}
section {
text-align: center;
height: 100%;
h1 {
padding-top: 40px;
text-transform: uppercase;
}
p {
min-width: 300px;
text-align: left;
display: inline-block;
padding: 30px;
}
}
footer {
text-align: center;
}
//____________SIGN
255px;:
84px;:
85;:
2.5s;:
a#dex-sign {
margin: 20px 0 2px 0;
opacity: .5;
display: inline-block;
width: ;
height: ;
background: url(http://www.drygiel.com/projects/sign/frames-255-white.png) 0 0 no-repeat; // Only 20KB!
&:hover {
opacity: 1;
-webkit-filter: ~'invert(30%) brightness(80%) sepia(100%) contrast(110%) saturate(953%) hue-rotate(165deg)';
}
&.play {
-moz-animation: sign-anim steps( ) forwards;
-o-animation: sign-anim steps( ) forwards;
-webkit-animation: sign-anim steps( ) forwards;
animation: sign-anim steps( ) forwards;
}
}
sign-anim {
to {
background-position: 0 * - ;
}
}
sign-anim {
to {
background-position: 0 * - ;
}
}
sign-anim {
to {
background-position: 0 * - ;
}
}
$('a.nice-link').each(function () {
$('a.nice-link').each(function () {
$(this).attr('data-text', $(this).text());
});
// Play signature when it's in view
$(window).scroll(function () { var sign = $('#dex-sign'); if (sign.offset().top + sign.outerHeight() <= $(this).scrollTop() + window.innerHeight + 5) sign.addClass('play'); });