Skip to content

Instantly share code, notes, and snippets.

If the cube is directly inside the container:
#container:hover > #cube { background-color: yellow; }
If cube is next to (after containers closing tag) the container:
#container:hover + #cube { background-color: yellow; }
If the cube is somewhere inside the container:
@juanres
juanres / gist:6877480
Created October 8, 2013 00:26
CSS: absolute center
item {
bottom: 0;
left: 0;
top: 0;
right: 0;
margin: auto;
position: absolute;
}
@juanres
juanres / gist:6912011
Created October 10, 2013 02:20
CSS: transiciones animacion
item {
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-ms-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
@juanres
juanres / gist:6912208
Created October 10, 2013 02:43
CSS: condicional pantalla pequeña mediaquerie
/* CONDICIONAL pantalla pequeña */
@media only screen and (max-width : 1280px){
}
@juanres
juanres / gist:6912199
Created October 10, 2013 02:41
CSS: condicional pantalla grande mediaquerie
/* CONDICIONAL pantalla grande */
@media only screen and (min-width : 1920px){
}
@juanres
juanres / gist:6912233
Created October 10, 2013 02:45
CSS: condicional pantalla portatil mediaquerie
/* CONDICIONAL pantalla portatil */
@media only screen and (max-width : 1224px){
}
@juanres
juanres / Triangulo css abajo
Created December 3, 2013 20:52
Triangulo css abajo
.abajo {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #f00;
}
@juanres
juanres / Triangulo arriba
Created December 3, 2013 20:52
Triangulo Css hacia arriba
.arriba {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-bottom: 20px solid black;
}
@juanres
juanres / Triangulo css derecha
Created December 3, 2013 20:54
Triangulo css derecha
.derecha {
width: 0;
height: 0;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 20px solid green;
}
@juanres
juanres / Triangulo css izquierda
Created December 3, 2013 20:54
Triangulo css izquierda
.izquierda {
width: 0;
height: 0;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-right:20px solid blue;
}