Guía rápida CSS
Normalize: https://necolas.github.io/normalize.css/8.0.1/normalize.css
Can I use: https://caniuse.com/
<link rel=”stylesheet” href=”ruta/al/archivo/archivo.css” />
<style type=”text/css”>
/* estilos css */
</style>
<elemento style=”propiedad_1: valor_1; propiedad_2: valor_2, ...>
Selectores:
.clase #id
* etiqueta
etiqueta.clase etiqueta, etiqueta
etiqueta etiqueta etiqueta>etiqueta hijos
etiqueta+etiqueta hermanos etiqueta1~etiqueta2 precedencia
[atributo] [atributo=valor]
[atributo~=valor] contiene [atributo|=valor] es o inicia por
[atributo^=valor] inicia con [atributo$=valor] termina con
[atributo*=valor] subcadena
:active ::after ::before
:checked :default :disabled
:empty :enabled :first-child
::first-letter ::first-line :first-of-type
:focus :fullscreen :hover
:in-range :indeterminate :invalid
:lang(language) :last-child :last-of-type
:link ::marker :not(selector)
:nth-child(n) :nth-last-child(n) :nth-last-of-type(n)
:nth-of-type(n) :only-of-type :only-child
:optional :out-of-range ::placeholder
:read-only :read-write :required
:root ::selection :target
:valid :visited
Medidas
_valor_unidad
Absolutas
cm
mm
in (1in = 96px = 2.54cm)
px
pt (1pt = 1/72in)
pc (1pc = 12pt = 1/6in)
Relativas
em
ex (alto de “x”)
ch (ancho de “0”)
rem
vw
vh
vmin
vmax
Otras
%
deg (circulo de 360 grados)
grad (círculo de 400 grados)
rad (radianes)
turn (1 circulo es 1turn)
s segundos
ms milisegundos
