Skip to content

Instantly share code, notes, and snippets.

@setola
Created June 11, 2012 22:53
Show Gist options
  • Save setola/2913238 to your computer and use it in GitHub Desktop.
Save setola/2913238 to your computer and use it in GitHub Desktop.
CSS gradient border
<style>
.inner,.wrapper:hover {
background: #e2017b;
background: -moz-linear-gradient(top, #e2017b 0%, #640037 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #e2017b), color-stop(100%, #640037) );
background: -webkit-linear-gradient(top, #e2017b 0%, #640037 100%);
background: -o-linear-gradient(top, #e2017b 0%, #640037 100%);
background: -ms-linear-gradient(top, #e2017b 0%, #640037 100%);
background: linear-gradient(top, #e2017b 0%, #640037 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2017b', endColorstr='#640037', GradientType=0 );
}
.wrapper,.inner:hover {
background: #640037;
background: -moz-linear-gradient(top, #640037 0%, #e2017b 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #640037), color-stop(100%, #e2017b) );
background: -webkit-linear-gradient(top, #640037 0%, #e2017b 100%);
background: -o-linear-gradient(top, #640037 0%, #e2017b 100%);
background: -ms-linear-gradient(top, #640037 0%, #e2017b 100%);
background: linear-gradient(top, #640037 0%, #e2017b 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#640037', endColorstr='#e2017b', GradientType=0 );
}
.wrapper {
width: 100px;
height: 30px;
line-height: 30px;
color: #fff;
text-align: center;
font-size: 16px;
padding: 1px;
cursor: pointer;
}
.inner {
width: 100%;
height: 100%;
}
.wrapper,.inner {
border-radius: 5px;
}
</style>
<div class="wrapper">
<div class="inner">CLICK ME!!!</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment