outline-width
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Resumen
La propiedad CSS outline-width
es usada para establecer el grosor del contorno de un elemento. Un contorno es una línea que se dibuja al rededor de los elementos, fuera de los límites del borde, para resaltar al elemento:
Valor inicial | medium |
---|---|
Applies to | all elements |
Heredable | no |
Valor calculado | an absolute length; if the keyword none is specified, the computed value is 0 |
Animation type | a length |
Sintaxis
css
/* Valores clave */
outline-width: thin;
outline-width: medium;
outline-width: thick;
/* Valores */
outline-width: 1px;
outline-width: 0.1em;
/* Valores globales */
outline-width: inherit;
Valores
Sintaxis formal
Ejemplos
Contenido HTML
html
thin
medium
thick
2px
1ex
2em
Contenido CSS
css
span {
outline-style: solid;
display: inline-block;
margin: 20px;
}
#thin {
outline-width: thin;
}
#medium {
outline-width: medium;
}
#thick {
outline-width: thick;
}
#twopixels {
outline-width: 2px;
}
#oneex {
outline-width: 1ex;
}
#twoem {
outline-width: 2em;
}
Especificaciones
Specification |
---|
CSS Basic User Interface Module Level 4 # outline-width |