Created
January 22, 2015 11:01
-
-
Save gunnarbittersmann/ca487891cca577bec0f2 to your computer and use it in GitHub Desktop.
heading with text background
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
| /** | |
| * heading with text background | |
| */ | |
| h1 | |
| { | |
| font: normal 2.5em/1.5 Georgia, serif; | |
| padding: 0 0.5em; | |
| background-image: linear-gradient( | |
| to bottom, | |
| transparent 10%, | |
| orange 10%, | |
| orange 95%, | |
| transparent 95% | |
| ); | |
| background-size: 100% 1.5em; | |
| overflow: hidden; | |
| position: relative; | |
| } | |
| h1::after | |
| { | |
| content: ""; | |
| position: absolute; | |
| background: white; | |
| width: 100%; | |
| height: 1.5em; | |
| margin-left: 0.5em; | |
| } |
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
| <h1>This is a very long heading which does not fit into a single line but spreads over multiple lines</h1> |
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
| // alert('Hello world!'); |
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
| {"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment