Last active
May 23, 2016 17:06
-
-
Save Hendekagon/11684c23f7a2c47c4edef79aa8022e92 to your computer and use it in GitHub Desktop.
Add a jaunty cheese-hat to any div
This file contains 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
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