Skip to content

Instantly share code, notes, and snippets.

@juniorcesarabreu
Last active April 11, 2017 18:28
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 juniorcesarabreu/5115455db2f832ff2bc08b298d26069e to your computer and use it in GitHub Desktop.
Save juniorcesarabreu/5115455db2f832ff2bc08b298d26069e to your computer and use it in GitHub Desktop.
Algumas dicas HTML
section {
border: 1px solid #000;
height: 100px;
margin: 40px auto;
width: 400px;
}
h1 {
background-color: #990000;
color: #FFF;
font-size: 1.2em;
left: -10px;
padding: 5px 0;
position: relative;
text-align: center;
width: 420px;
}
h1::before {
border-color: transparent #7C0000 #7C0000 transparent;
border-style: solid;
border-width: 5px;
content: "";
left: 0;
position: absolute;
top: -10px;
}
h1::after {
border-color: transparent transparent #7C0000 #7C0000;
border-style: solid;
border-width: 5px;
content: "";
position: absolute;
right: 0;
top: -10px;
}
<section>
<h1>Um exemplo de pseudo elementos</h1>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment