Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2012 13:30
Show Gist options
  • Save anonymous/4267723 to your computer and use it in GitHub Desktop.
Save anonymous/4267723 to your computer and use it in GitHub Desktop.
CSS Button with arrow & gradient (Square rotation technique).
.button-next-arrow {
background-image: linear-gradient(bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -o-linear-gradient(bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -moz-linear-gradient(bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -webkit-linear-gradient(bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -ms-linear-gradient(bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -webkit-gradient(
linear,
left bottom,
left top,
color-stop(0.2, rgb(52,70,115)),
color-stop(0.8, rgb(103,125,180))
);
border-radius: 0px;
-webkit-border-top-left-radius: 5px;
-webkit-border-bottom-left-radius: 5px;
-moz-border-radius-topleft: 5px;
-moz-border-radius-bottomleft: 5px;
border-top-left-radius: 5px;
border-bottom-left-radius: 5px;
font-family: BebasNeueRegular;
font-size: 1.5em;
position: relative;
color: white;
min-width: 90px;
padding: 5px 15px;
border: 0px;
cursor: pointer;
margin: 5px 0px;
margin-right: 10px;
font-weight: bold;
height: 35px;
}
.button-next-arrow:after {
content:"";
width: 25px;
height: 25px;
background-image: linear-gradient(right bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -o-linear-gradient(right bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -moz-linear-gradient(right bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -webkit-linear-gradient(right bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -ms-linear-gradient(right bottom, rgb(52,70,115) 20%, rgb(103,125,180) 80%);
background-image: -webkit-gradient(
linear,
right bottom,
left top,
color-stop(0.2, rgb(52,70,115)),
color-stop(0.8, rgb(103,125,180))
);
-moz-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
display:block;
position:absolute;
top: 5px;
right: -13px;
z-index:999;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment