Created
May 20, 2012 22:50
-
-
Save oloman/2759826 to your computer and use it in GitHub Desktop.
Otro semáforo CSS
This file contains 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
/* Otro semáforo CSS */ | |
.semaforo, | |
.semaforo:before, | |
.semaforo:after { | |
position: relative; | |
width: 100px; | |
height: 100px; | |
border-radius: 50%; | |
background: lightgrey; | |
margin: 0 auto; | |
} | |
.semaforo:before { | |
position: absolute; | |
left: -100px; | |
content: ""; | |
} | |
.semaforo:after { | |
position: absolute; | |
right: -100px; | |
content: ""; | |
} | |
.verde { | |
background: limegreen; | |
} | |
.naranja { | |
background: orange; | |
} | |
.rojo { | |
background: red; | |
} | |
.azul { | |
background: blue; | |
} | |
.amarillo { | |
background: yellow; | |
} | |
.verdei:before { | |
background: limegreen; | |
} | |
.naranjai:before { | |
background: orange; | |
} | |
.rojoi:before { | |
background: red; | |
} | |
.azuli:before { | |
background: blue; | |
} | |
.amarilloi:before { | |
background: yellow; | |
} | |
.verded:after { | |
background: limegreen; | |
} | |
.naranjad:after { | |
background: orange; | |
} | |
.rojod:after { | |
background: red; | |
} | |
.azuld:after { | |
background: blue; | |
} | |
.amarillod:after { | |
background: yellow; | |
} | |
This file contains 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
<!-- HTML --> | |
<!-- Cambia los colores añadiendo i o d según la posición dónde quieres que aparezcan --> | |
<div class="semaforo verdei rojo "> | |
</div> | |
<br/> | |
<div class="semaforo naranjai verde azuld "> | |
</div> | |
This file contains 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
{"view":"separate","fontsize":"90","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment