Skip to content

Instantly share code, notes, and snippets.

@veremey
Created April 3, 2015 22:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veremey/c1350073a066d5ed5512 to your computer and use it in GitHub Desktop.
Save veremey/c1350073a066d5ed5512 to your computer and use it in GitHub Desktop.
текст в центре между линиями
<h1>Немного букв</h1>
body{
background-color: #f0f;
}
h1 {
overflow: hidden;
position: relative;
width: 80%;
margin: 0 auto;
font-family: Georgia, serif;
font-size: 24px;
font-weight: normal;
text-align: center;
white-space: nowrap;
}
h1:before,
h1:after {
content: '';
position: relative;
display: inline-block;
vertical-align: middle;
width: 50%;
height: 9px;
top: -1px;
border-bottom: 1px solid #fff;
border-top: 1px solid #fff;
}
h1:before {
left: -.5em;
margin-left: -50%;
}
h1:after {
left: 10px;
margin-right: -50%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment