Propiedad de estilo de fuente CSS
Ejemplo
Establezca diferentes estilos de fuente para tres párrafos:
p.a {
font-style: normal;
}
p.b {
font-style: italic;
}
p.c {
font-style: oblique;
}
Definición y uso
La font-style
propiedad especifica el estilo de fuente para un texto.
Valor por defecto: | normal |
---|---|
Heredado: | sí |
Animable: | No. Leer sobre animable |
Versión: | CSS1 |
Sintaxis de JavaScript: | objeto .style.fontStyle="cursiva" |
Compatibilidad con navegador
Los números de la tabla especifican la primera versión del navegador que es totalmente compatible con la propiedad.
Property | |||||
---|---|---|---|---|---|
font-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Sintaxis CSS
font-style: normal|italic|oblique|initial|inherit;
Valores de propiedad
Value | Description | Play it |
---|---|---|
normal | The browser displays a normal font style. This is default | |
italic | The browser displays an italic font style | |
oblique | The browser displays an oblique font style | |
initial | Sets this property to its default value. Read about initial | |
inherit | Inherits this property from its parent element. Read about inherit |
páginas relacionadas
Tutorial de CSS: fuente CSS
Referencia CSS: propiedad de fuente
Referencia HTML DOM: propiedad fontStyle