> Algunas de las funciones que vas a ver,
son experimentales... ¡Debes activarlas!
Slide 6
Slide 6 text
> Elementos flexibles CSS
Flexbox
Slide 7
Slide 7 text
> Block CSS
#falcon {
width:500px;
margin:6em auto;
min-height:100px;
background:#AAA;
display:block;
}
#falcon div {
width:75px;
height:50px;
margin:5px;
background:blue;
} CSS
HTML
Slide 8
Slide 8 text
> Flexbox CSS (hijos tamaño fijo)
#falcon {
width:500px;
margin:6em auto;
min-height:100px;
background:#AAA;
display:flex;
}
#falcon div {
width:75px;
height:50px;
margin:5px;
background:blue;
} CSS
HTML
Slide 9
Slide 9 text
> Flexbox CSS (altura flexible)
#falcon {
width:500px;
margin:6em auto;
min-height:100px;
background:#AAA;
display:flex;
}
#falcon div {
width:75px;
height:50px;
margin:5px;
background:blue;
} CSS
HTML
Slide 10
Slide 10 text
> Flexbox CSS (anchura flexible)
#falcon {
width:500px;
margin:6em auto;
min-height:100px;
background:#AAA;
display:flex;
}
#falcon div {
width:100%;
margin:5px;
background:blue;
}
CSS
HTML
Puedo
cambiar
el ancho
del padre
y los
hijos se
adaptan
Slide 11
Slide 11 text
> Flexbox CSS (centrar eje primario)
#falcon {
width:500px;
margin:6em auto;
min-height:100px;
background:#AAA;
display:flex;
justify-content:center;
}
#falcon div {
width:75px;
height:50px;
margin:5px;
background:blue;
} CSS
HTML
> Battery API
navigator.getBattery().then(
function(battery) {
console.log(battery.level); // 0..1
console.log(battery.charging); // true / false
battery.onlevelchange = function() {
// ha cambiado el nivel de carga
}
battery.onchargingchange = function() {
// se ha conectado/desconectado el dispositivo
}
}
);
JS
Slide 25
Slide 25 text
> Battery API
Slide 26
Slide 26 text
Battery API
Slide 27
Slide 27 text
> Formas y máscaras CSS
Formas
Slide 28
Slide 28 text
> Formas CSS
El ronroneo suele ser signo de satisfacción. Algunos gatos
lo hacen simplemente para tratar de calmarse a sí mismos.
p {
width:400px;
font-size:22px;
padding:20px;
}
CSS
HTML
#cat {
width:400px;
float:left;
}