Card ribbon in pure CSS. (in bytes!)
$ npm install --save card-ribbon
The parent element of .card-ribbon
should be position: relative;
<div class="parent-element">
<div class="card-ribbon">This is the ribbon!</div>
<div class="content">Whatever contents...</div>
</div>
Then include the CSS file via <link>
attribute.
<link rel="stylesheet" href="/path/to/card-ribbon/dist/card-ribbon.css">
Or use some CSS pre-processor:
@import "card-ribbon";
IE 10 and above, Chrome, Safari, Firefox and a bunch of shit.
MIT © EGOIST