Create > Arrows with :before, :after and CSS Transforms
by stowball
HTML
<h2>Create > Arrows with :before, :after and CSS Transforms</h2>
<a href="#">Link with an arrow</a>
CSS
a {
background: #bbb;
background: -moz-linear-gradient(top, #efefef 0%, #bbb 100%);
background: -o-linear-gradient(top, #efefef 0%, #bbb 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #efefef), color-stop(100%, #bbb));
background: -webkit-linear-gradient(top, #efefef 0%, #bbb 100%);
background: linear-gradient(top, #efefef 0%, #bbb 100%);
border: 1px solid #aaa;
color: #c00;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px;
display: inline-block;
font-family: Arial, Helvetica, sans-serif;
font-weight: bold;
padding: 10px 25px 10px 10px;
position: relative;
text-decoration: none;
}
a:before, a:after {
border-right: 2px solid;
content: '';
display: block;
height: 8px;
margin-top: -6px;
position: absolute;
-moz-transform: rotate(135deg);
-o-transform: rotate(135deg);
-webkit-transform: rotate(135deg);
transform: rotate(135deg);
right: 10px;
top: 50%;
width: 0;
}
a:after {
margin-top: -1px;
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform: rotate(45deg);
}
a:hover, a:focus,
a:hover:before, a:hover:after,
a:focus:before, a:focus:after {
color: #000;
}