Created
September 14, 2011 05:45
-
-
Save parrfolio/1215936 to your computer and use it in GitHub Desktop.
CSS3 Text Mask for Firefox
This file contains hidden or 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
| body { | |
| background: #444; | |
| } | |
| h2 { | |
| font-size:68px; | |
| color:#f1f1f1; | |
| position:relative; | |
| z-index:1; | |
| font-family:helvetica, arial, sans-serif; | |
| } | |
| h2:after { | |
| color:#666; | |
| content: 'Firefox Text Mask'; | |
| position:absolute; | |
| left:0; | |
| opacity:1; | |
| z-index:100; | |
| margin-top:-1px; | |
| margin-left:-1px; | |
| mask: url('mask.svg#mask'); | |
| text-shadow:0 1px 3px #000; | |
| } | |
| h2:before { | |
| color:#222; | |
| content: 'Firefox Text Mask'; | |
| position:absolute; | |
| left:0; | |
| margin-top:1px; | |
| margin-left:1px; | |
| z-index:1020; | |
| mask: url('mask.svg#mask'); | |
| } |
This file contains hidden or 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
| <h2>Firefox Text Mask</h2> |
This file contains hidden or 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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <svg version="1.1" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient gradientUnits="objectBoundingBox" id="gradient" x2="0" y2="1"> | |
| <stop stop-offset="0" /> | |
| <stop stop-color="white" offset="1"/> | |
| </linearGradient> | |
| <mask id="mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox" x="0" y="0" width="100%" height="100%"> | |
| <rect width="1" height="1" fill="url(#gradient)"/> | |
| </mask> | |
| </defs> | |
| </svg> |
This file contains hidden or 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
| <!-- SVG file needs to be on the same domain --> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <svg version="1.1" xmlns="http://www.w3.org/2000/svg"> | |
| <defs> | |
| <linearGradient gradientUnits="objectBoundingBox" id="gradient" x2="0" y2="1"> | |
| <stop stop-offset="0" /> | |
| <stop stop-color="white" offset="1"/> | |
| </linearGradient> | |
| <mask id="mask" maskUnits="objectBoundingBox" maskContentUnits="objectBoundingBox" x="0" y="0" width="100%" height="100%"> | |
| <rect width="1" height="1" fill="url(#gradient)"/> | |
| </mask> | |
| </defs> | |
| </svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment