<section>
<div class="quote">
<cite>
Lorem ipsum dolor sit amet, consectetur adipiscing elit
fusce vel sapien elit in malesuada semper mi.
</cite>
<span id="replay">Replay</span>
<a id="dex-sign" class="play" href="http://drygiel.com" target="_blank"></a>
</div>
</section>
<footer>
Want your own signature? Contact me at <a href="mailto:veratrion@gmail.com">veratrion@gmail.com</a>
</footer>
@sign-x: 255px;
@sign-y: 84px;
@sign-frames: 85;
@sign-duration: 3.5s;
@sign-delay: .2s;
#dex-sign {
display: inline-block;
margin: 30px 10px 15px 10px;
width: @sign-x;
height: @sign-y;
background: url(http://drygiel.com/projects/sign/frames.png) no-repeat;
&.white {
background-image: url(http://drygiel.com/projects/sign/frames-255-white.png);
}
&.play {
animation: sign-anim @sign-duration @sign-delay steps(@sign-frames) forwards;
animation: sign-anim @sign-duration @sign-delay steps(@sign-frames) forwards;
animation: sign-anim @sign-duration @sign-delay steps(@sign-frames) forwards;
animation: sign-anim @sign-duration @sign-delay steps(@sign-frames) forwards;
}
}
a#dex-sign {
&:hover {
@sign-hover-color-spin: 165deg;
filter: ~'invert(30%) brightness(80%) sepia(100%) contrast(110%) saturate(953%) hue-rotate(@{sign-hover-color-spin})';
}
}
@-webkit-keyframes sign-anim {
to {
background-position: 0 @sign-frames * -@sign-y;
}
}
@-moz-keyframes sign-anim {
to {
background-position: 0 @sign-frames * -@sign-y;
}
}
@keyframes sign-anim {
to {
background-position: 0 @sign-frames * -@sign-y;
}
}
// _____________________________________________ LAYOUT
* {
margin: 0;
padding: 0;
}
body, html {
font-size: 1em;
color: #2C2C2C;
height: 100%;
font-family: 'Raleway', sans-serif;
}
::selection {
background: white;
}
::selection {
background: white;
}
section {
@color1: #FFF;
@color2: #D6D6D6;
height: 100%;
min-height: 335px;
background-color: @color1;
background-image: radial-gradient(center top, circle cover, @color1, @color2);
background-image: radial-gradient(center top, circle cover, @color1, @color2);
background-image: radial-gradient(center top, circle cover, @color1, @color2);
background-image: radial-gradient(center top, circle cover, @color1, @color2);
background-image: radial-gradient(center top, circle cover, @color1, @color2);
text-align: center;
&:before {
content: '';
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
min-height: 335px;
pointer-events: none;
opacity: .30;
}
#replay {
position: absolute;
z-index: 9999;
bottom: -65px;
left: 50%;
transform: translateX(-50%);
display: inline-block;
padding: 10px;
background: rgba(240, 240, 240, 0.44);
border: 1px solid #BABABA;
color: #696969;
text-transform: uppercase;
text-decoration: none;
font-size: .6em;
transition: left 6s cubic-bezier(1,.01,1,.01);
transition: left 6s cubic-bezier(1,.01,1,.01);
transition: left 6s cubic-bezier(1,.01,1,.01);
transition: left 6s cubic-bezier(1,.01,1,.01);
&:hover {
left: -100000%;
transition: none;
transition: none;
transition: none;
transition: none;
+ .play {
animation: none !important;
animation: none !important;
animation: none !important;
animation: none !important;
}
}
}
.quote {
position: absolute;
left: 25%;
right: 25%;
top: 20%;
padding: 30px 0 15px 0;
cite {
color: #444;
font-family: "Hoefler Text", Georgia, Garamond, Times, serif;
letter-spacing: 0.1em;
text-align: center;
line-height: 110%;
font-size: 1.7em;
font-variant: small-caps;
&:before {
content: '’’';
position: absolute;
left: -100px;
top: 100px;
width: 100%;
height: 100%;
pointer-events: none;
font-size: 8em;
text-align: left;
font-family: Arial;
letter-spacing: -16px;
font-style: normal;
font-weight: bold;
color: rgb(123, 154, 185);
}
}
#dex-sign
{
position: absolute;
bottom: -125px;
right: 0;
}
}
}
footer {
background-color: #2C2C2C;
color: #8A8A8A;
padding: 25px;
text-align: center;
a {
text-decoration: none;
color: #4384E6;
&:hover {
color: white;
}
}
}
View Compiled
// Why it's amazing?
// 1. No GIF animation, only lighweight (20KB) PNG sequence animated using CSS3
// 2. 'Replay' animation button with no JS, pure CSS
// 3. Change color of the sign on mouse hover (css filters)
This Pen doesn't use any external CSS resources.