Skip to content

Instantly share code, notes, and snippets.

@alexdiliberto
Created April 8, 2019 14:30
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 alexdiliberto/9657704882b7db60b3c297584ba53a13 to your computer and use it in GitHub Desktop.
Save alexdiliberto/9657704882b7db60b3c297584ba53a13 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/kicaham
<!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>
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