Skip to content

Instantly share code, notes, and snippets.

@xiaxianlin
Created May 6, 2016 07:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiaxianlin/ad725606534468df02ba80b33c0ad25e to your computer and use it in GitHub Desktop.
Save xiaxianlin/ad725606534468df02ba80b33c0ad25e to your computer and use it in GitHub Desktop.
Untitled
.btn{
position: relative;
width: 100px;
text-align: center;
line-height: 30px;
color: #fff;
margin: 150px auto;
background: #58a;
}
.btn:before,
.btn:after{
content: ' ';
position: absolute;
z-index: -1;
display: block;
width: 0;
height: 0;
}
.btn:before{
border: 10px solid transparent;
border-right-color: red;
left: -10px;
bottom: -10px;
}
.btn:after{
border: 15px solid transparent;
border-left-color: #58a;
border-bottom-color: #58a;
top: 0;
right: -30px;
}
<div class="btn">button</div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment