Created
April 21, 2012 20:24
-
-
Save phette23/2439402 to your computer and use it in GitHub Desktop.
How to Make a Sword in HTML & CSS (no images)
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
<style> | |
#dagger { | |
/* important to have a serif font for the dagger | |
sans-serif will look like a cross | |
see: http://en.wikipedia.org/wiki/File:Daggers.svg */ | |
font-family: "Old English Text MT", "Times New Roman", Times; | |
-moz-transform: rotate(180deg); | |
-webkit-transform: rotate(180deg); | |
-o-transform: rotate(180deg); | |
-ms-transform: rotate(180deg); | |
/* thank YOU Microsoft for having a totally succinct & rationale syntax | |
oh yeah & 2 = 180º here. But you already knew that because it's so obvious, right? */ | |
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); | |
transform: rotate(180deg); | |
/* polyfill for rotation is probably overkill | |
the fallback is users just get an upside down dagger, no biggie */ | |
} | |
</style> | |
<!-- "dagger" entity: http://htmlhelp.com/reference/html40/entities/special.html --> | |
<span id="dagger">†</span> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment