Skip to content

Instantly share code, notes, and snippets.

@Hendekagon
Last active May 23, 2016 17:06
Show Gist options
  • Save Hendekagon/11684c23f7a2c47c4edef79aa8022e92 to your computer and use it in GitHub Desktop.
Save Hendekagon/11684c23f7a2c47c4edef79aa8022e92 to your computer and use it in GitHub Desktop.
Add a jaunty cheese-hat to any div
div::before {
width: 3em;
top: -2.6em;
height: 3em;
transform-origin: 50% 50%;
transform: rotate(-29deg);
position: relative;
z-index: 10000000;
margin-bottom: -3em;
content: url("data:image/svg+xml;utf8,<svg height='100%' viewBox='-8 -8 16 16' width='100%' xmlns='http://www.w3.org/2000/svg'><g><rect fill='white' height='5' stroke-width='0.25' stroke='black' transform='rotate(45) translate(8,8)' width='5' x='-10.5' y='-10.5'></rect><rect fill='white' height='5' stroke-width='0.25' stroke='black' width='15' x='-7.5' y='0'></rect><text font-family='monospace' font-size='2.5' x='-5' y='3.25'>CHEESE</text></g></svg>");
margin-left: -3em;
opacity: 1.0;
left: 1.5em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment