Propiedad de guiones CSS
Ejemplo
Establecer diferentes guiones:
div.a {
-webkit-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
div.b {
-webkit-hyphens: manual;
-ms-hyphens:
manual;
hyphens: manual;
}
div.c {
-webkit-hyphens:
auto;
-ms-hyphens: auto;
hyphens: auto;
}
Definición y uso
La hyphens
propiedad define si se permite la separación silábica para crear más oportunidades de ajuste suave dentro de una línea de texto.
Valor por defecto: | manual |
---|---|
Heredado: | sí |
Animable: | No. Leer sobre animable |
Versión: | CSS3 |
Sintaxis de JavaScript: | objeto .style.hyphens="ninguno" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Property | |||||
---|---|---|---|---|---|
hyphens | 55.0 | 79.0 10.0 -ms- |
43.0 | 5.1 -webkit- | 44.0 |
Sintaxis CSS
hyphens: none|manual|auto|initial|inherit;
Valores de propiedad
Value | Description |
---|---|
none | Words are not hyphenated |
manual | Default. Words are only hyphenated at ‐ or ­ (if needed) |
auto | Words are hyphenated where the algorithm is deciding (if needed) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |