Created
November 13, 2016 21:56
-
-
Save VitorDiToro/b2c600fd2b678a3b1cc61bf12587f62e to your computer and use it in GitHub Desktop.
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
/* | |
CSS Projeto Automacao Residencial | |
FILIPEFLOP Componentes Eletronicos | |
*/ | |
root { | |
display: block; | |
} | |
body { | |
margin: 0; | |
padding: 0; | |
} | |
#wrapper { | |
padding-top: 40px; | |
position: relative; | |
width: 530px; | |
height: 600px; | |
margin-right: auto; | |
margin-top: 0; | |
margin-left: auto; | |
font-size: 30px; | |
color: black; | |
text-align: center; | |
font-family: arial; | |
} | |
div.luz_ligado { | |
position: absolute; | |
right: -110px; | |
top: 220px; | |
width: 300px; | |
height: 206px; | |
border: none; | |
margin:auto; | |
background: url(lampada_ligada.png) no-repeat left top; | |
} | |
div.luz_desligado { | |
position: absolute; | |
right: -110px; | |
top: 220px; | |
width: 300px; | |
height: 206px; | |
border: none; | |
background: url(lampada_desligada.png) no-repeat left top; | |
} | |
div.rele2_ligado { | |
position: absolute; | |
right: -110px; | |
top: 387px; | |
width: 300px; | |
height: 206px; | |
border: none; | |
background: url(lampada_ligada.png) no-repeat left top; | |
} | |
div.rele2_desligado { | |
position: absolute; | |
right: -110px; | |
top: 387px; | |
width: 300px; | |
height: 206px; | |
border: none; | |
background: url(lampada_desligada.png) no-repeat left top; | |
} | |
div.rele3_ligado { | |
position: absolute; | |
right: -110px; | |
top: 387px; | |
width: 300px; | |
height: 206px; | |
border: none; | |
background: url(lampada_ligada.png) no-repeat left top; | |
} | |
div.rele3_desligado { | |
position: absolute; | |
right: -110px; | |
top: 387px; | |
width: 300px; | |
height: 206px; | |
border: none; | |
background: url(lampada_desligada.png) no-repeat left top; | |
} | |
#div1 { | |
position: absolute; | |
right: 85px; | |
top: 195px; | |
border-radius: 25px; | |
border: 2px solid #000000; | |
width: 350px; | |
height: 150px; | |
} | |
#div2 { | |
position: absolute; | |
right: 85px; | |
top: 355px; | |
border-radius: 25px; | |
border: 2px solid #000000; | |
width: 350px; | |
height: 150px; | |
} | |
#div3 { | |
position: absolute; | |
right: 85px; | |
top: 515px; | |
border-radius: 25px; | |
border: 2px solid #000000; | |
width: 350px; | |
height: 150px; | |
} | |
#botao{ | |
position: absolute; | |
right: 230px; | |
top: 250px; | |
width: 200px; | |
height: 256px; | |
} | |
.botao { | |
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff; | |
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; | |
box-shadow:inset 0px 0px 0px 0px #ffffff; | |
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.1, #16ADFF), color-stop(1, #26A8FF) ); | |
background:-moz-linear-gradient( center top, #16ADFF 5%, #26A8FF 100% ); | |
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#16ADFF', endColorstr='#26A8FF'); | |
background-color:#ededed; | |
-moz-border-radius:6px; | |
-webkit-border-radius:6px; | |
border-radius:6px; | |
border:1px solid #dcdcdc; | |
display:inline-block; | |
color:#ffffff; | |
font-family:arial; | |
font-size:28px; | |
font-weight:bold; | |
padding:10px 40px; | |
text-decoration:none; | |
text-shadow:0px 0px 0px #ffffff; | |
width: 100px; | |
text-align: center; | |
} | |
}.botao:active { | |
position:relative; | |
top:1px; | |
} | |
#botao_2{ | |
position: absolute; | |
right: 230px; | |
top: 417px; | |
width: 200px; | |
height: 256px; | |
} | |
.botao_2 { | |
-moz-box-shadow:inset 0px 1px 0px 0px #ffffff; | |
-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; | |
box-shadow:inset 0px 0px 0px 0px #ffffff; | |
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.1, #16ADFF), color-stop(1, #26A8FF) ); | |
background:-moz-linear-gradient( center top, #16ADFF 5%, #26A8FF 100% ); | |
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#16ADFF', endColorstr='#26A8FF'); | |
background-color:#ededed; | |
-moz-border-radius:6px; | |
-webkit-border-radius:6px; | |
border-radius:6px; | |
border:1px solid #dcdcdc; | |
display:inline-block; | |
color:#ffffff; | |
font-family:arial; | |
font-size:28px; | |
font-weight:bold; | |
padding:10px 40px; | |
text-decoration:none; | |
text-shadow:0px 0px 0px #ffffff; | |
width: 100px; | |
text-align: center; | |
} | |
}.botao_2:active { | |
position:relative; | |
top:1px; | |
} |
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
function AlteraRele1(){ | |
var estado = document.getElementById("estado").innerHTML; | |
if(estado === "0"){ | |
document.getElementById("estado").innerHTML="1"; | |
document.getElementById("luz").innerHTML="<div class='luz_ligado'></div>"; | |
document.getElementById("botao").innerHTML="<a href='/?desligar' class='botao'>Desliga</a>"; | |
} else { | |
document.getElementById("estado").innerHTML="0"; | |
document.getElementById("luz").innerHTML="<div class='rele1_desligado'></div>"; | |
document.getElementById("botao").innerHTML="<a href='/?ligar' class='botao'>Liga</a>"; | |
} | |
} | |
function AlteraRele2(){ | |
var estado_2 = document.getElementById("estado_2").innerHTML; | |
if(estado_2 === "0"){ | |
document.getElementById("estado_2").innerHTML="1"; | |
document.getElementById("rele_2").innerHTML="<div class='rele2_ligado'></div>"; | |
document.getElementById("botao_2").innerHTML="<a href='/?2_desligar' class='botao_2'>Desliga</a>"; | |
} else { | |
document.getElementById("estado_2").innerHTML="0"; | |
document.getElementById("rele_2").innerHTML="<div class='rele2_desligado'></div>"; | |
document.getElementById("botao_2").innerHTML="<a href='/?2_ligar' class='botao_2'>Liga</a>"; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment