Skip to content

Instantly share code, notes, and snippets.

@gunnarbittersmann
Created February 19, 2014 10:23
Show Gist options
  • Save gunnarbittersmann/9089413 to your computer and use it in GitHub Desktop.
Save gunnarbittersmann/9089413 to your computer and use it in GitHub Desktop.
heading with inline rounded corners
/**
* heading with inline rounded corners
*/
h1
{
background: orange;
padding: 0 1em;
border-radius: 1em 0 0 0;
overflow: hidden;
position: relative;
}
h1 > span[role="presentation"]
{
position: absolute;
width: 100%;
background: white;
}
h1 > span[role="presentation"]::before
{
content: "\A0";
background: orange;
border-radius: 0 0 1em 0;
width: 1em;
position: absolute;
}
<h1>Das ist eine Überschrift, die bei schmalen Browserfenstern auch mehrzeilig werden kann
<span role="presentation">&nbsp;</span>
</h1>
// alert('Hello world!');
{"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