Skip to content

Instantly share code, notes, and snippets.

@tcurvelo
Last active February 19, 2017 04:55
Show Gist options
  • Save tcurvelo/da89e326e056a882e32cf9002c7c3928 to your computer and use it in GitHub Desktop.
Save tcurvelo/da89e326e056a882e32cf9002c7c3928 to your computer and use it in GitHub Desktop.
Inclui faixa de 'versão de homologacao'
document.addEventListener("DOMContentLoaded", function(event) {
const faixa = document.createElement('div');
const estilo = document.createElement('style');
faixa.id='faixa-homologacao';
faixa.textContent = 'Versão de Homologação';
estilo.textContent = `
#${faixa.id} {
margin: 0;
padding: 0;
background: linear-gradient(to top right, #ccc, #7a1c1c);
border: 1px dashed white;
outline: 2px solid #7a1c1c;
color: white;
font: small-caps 20px 'MS Trebuchet', Helvetica, sans-serif;
text-align: center;
transform: rotate(45deg);
-webkit-transform: rotate(45deg);
transform-origin: right;
box-sizing: border-box;
width: 500px;
padding: 4px 100px;
position: fixed;
top: 260px;
right: -80px;
transition: all 0.3s;
opacity: 0.9;
z-index: 10000;
}
#${faixa.id}:hover {
opacity: 0.3;
}
`;
document.head.appendChild(estilo);
document.body.appendChild(faixa);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment