Created
April 8, 2019 14:30
-
-
Save alexdiliberto/9657704882b7db60b3c297584ba53a13 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/kicaham
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
html { | |
background: #f4f4f4; | |
text-align: center; | |
-webkit-font-smoothing: antialiased; | |
} | |
.tag { | |
font-size: 1rem; | |
font-family: sans-serif; | |
color: white; | |
display: inline-block; | |
background: linear-gradient(-45deg, transparent 8px, #63a830 0); | |
padding: 10px; | |
} | |
.tag-with-border { | |
position: relative; | |
border: 1px solid black; | |
} | |
.tag-with-border:before { | |
content: ''; | |
position: absolute; | |
right: -1px; | |
bottom: -1px; | |
border-bottom: 14px solid black; | |
border-left: 14px solid transparent; | |
} | |
.tag-with-border:after { | |
content: ''; | |
position: absolute; | |
right: -1px; | |
bottom: -2px; | |
border-bottom: 14px solid white; | |
border-left: 14px solid transparent; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="tag">TAG: TEXT</div> | |
<div class="tag tag-with-border">TAG: TEXT</div> | |
<script id="jsbin-source-css" type="text/css">html { | |
background: #f4f4f4; | |
text-align: center; | |
-webkit-font-smoothing: antialiased; | |
} | |
.tag { | |
font-size: 1rem; | |
font-family: sans-serif; | |
color: white; | |
display: inline-block; | |
background: linear-gradient(-45deg, transparent 8px, #63a830 0); | |
padding: 10px; | |
} | |
.tag-with-border { | |
position: relative; | |
border: 1px solid black; | |
} | |
.tag-with-border:before { | |
content: ''; | |
position: absolute; | |
right: -1px; | |
bottom: -1px; | |
border-bottom: 14px solid black; | |
border-left: 14px solid transparent; | |
} | |
.tag-with-border:after { | |
content: ''; | |
position: absolute; | |
right: -1px; | |
bottom: -2px; | |
border-bottom: 14px solid white; | |
border-left: 14px solid transparent; | |
} | |
</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
background: #f4f4f4; | |
text-align: center; | |
-webkit-font-smoothing: antialiased; | |
} | |
.tag { | |
font-size: 1rem; | |
font-family: sans-serif; | |
color: white; | |
display: inline-block; | |
background: linear-gradient(-45deg, transparent 8px, #63a830 0); | |
padding: 10px; | |
} | |
.tag-with-border { | |
position: relative; | |
border: 1px solid black; | |
} | |
.tag-with-border:before { | |
content: ''; | |
position: absolute; | |
right: -1px; | |
bottom: -1px; | |
border-bottom: 14px solid black; | |
border-left: 14px solid transparent; | |
} | |
.tag-with-border:after { | |
content: ''; | |
position: absolute; | |
right: -1px; | |
bottom: -2px; | |
border-bottom: 14px solid white; | |
border-left: 14px solid transparent; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment