<a href="#" class="ghostButton-simple">Hover Me</a><a href="#" class="ghostButton-3d"> <div class="front">Hover Me</div> <div class="back">Thanks!</div></a>
@bg: #1abc9c; @c: white; // GHOST BUTTON MIXIN - SIMPLE .ghostButton-simple(@c:@c,@bg:@bg,@b:3px,@h:70px,@t:.3s){ @w: @h*3; @f: @h/3; @m: @h/10; display: inline-block; position: relative; color: @c; width: @w; height: @h; line-height: @h; font-size: @f; text-align: center; text-transform: uppercase; text-decoration: none; font-weight: bold; transition: @t; &:after, &:before { content: ""; position: absolute; } &:after { background-color: @c; top: 50%; left: 50%; width: 0; height: 0; transform: translate(-50%,-50%); transition: @t; opacity: 1; } &:before { top: -(@m+@b); left: -(@m+@b); bottom: -(@m+@b); right: -(@m+@b); border: @b solid @c; } &:hover { background-color: @c; color: @bg; &:after { width: @w+(@m+@b); height: @h+(@m+@b); opacity: 0; } } } // USE: .ghostButton-simple { .ghostButton-simple(); } // GHOST BUTTON MIXIN - 3D .ghostButton-3d(@c:@c,@bg:@bg,@b:3px,@h:70px,@t:.3s) { @w: @h*3; @f: @h/3; @m: @h/10; position: relative; top: 0; left: 0; display: inline-block; width: @w; height: @h; transition: @t; perspective: 1000; transform-style: preserve-3d; &:before { content: ""; position: absolute; top: -(@m+@b); left: -(@m+@b); bottom: -(@m+@b); right: -(@m+@b); border: @b solid @c; transition: @t; transform-style: preserve-3d; } .front, .back { position: absolute; backface-visibility: hidden; color: @c; width: @w; height: @h; line-height: @h; font-size: @f; text-align: center; text-transform: uppercase; text-decoration: none; font-weight: bold; transition: @t; } .front { z-index: 2; } .back { transform: rotate3d(45, 45, 0, 180deg); background-color: @c; color: @bg; } &:hover { transform: rotate3d(45, 45, 0, 180deg); } &:hover:before { transform: rotate3d(45, -45, 0, 180deg); } } // USE: .ghostButton-3d { .ghostButton-3d(); } // GENERAL STYLES @import url(http://fonts.googleapis.com/css?family=Cabin:700); body { padding: 3em; background-color: @bg; font-family: 'Cabin', sans-serif; } a { float: left; margin: 0 2em 2em 0; }
SCSS social icon with hover effect and active state.
SCSS loader fade in and fade out.
CSS keyboard with beautiful color and effect.
Showing random numbers mixed up.
Buttons with beautiful hover effect.
Beautiful glass effect with css.
Creating clip animation with css.
Google logos with css.
Abstract art with pure css. Combination of shapes created with css.
Add a name and some details about this content.
Select a Category