翻译不完整。 请帮助我们翻译这篇文章!

font-style CSS 属性允许你选择 font-family 字体下的 italicoblique 样式。

Italic 样式一般是指书写体,相比无样式的字体,通常会占用较少的高度,而 oblique 字形一般只是常规字形的倾斜版本。斜体(italic) 和倾斜体(oblique)都是通过人工倾斜常规字体的字形来模拟的(使用 font-synthesis 对此进行控制)。

Italic font faces are generally cursive in nature, usually using less horizontal space than their unstyled counterparts, while oblique faces are usually just sloped versions of the regular face. When the specified style is not available, both italic and oblique faces are simulated by artificially sloping the glyphs of the regular face (use font-synthesis to control this behavior).


font-style: normal;
font-style: italic;
font-style: oblique;
font-style: oblique 10deg;

/* Global values */
font-style: inherit;
font-style: initial;
font-style: unset;

font-style 属性被指定为从下面的取值列表中的单独一个关键字,如果关键字是 oblique,则可附加一个可选的角度。

选择 font-family 的常规字体。
选择斜体,如果当前字体没有可用的斜体版本,会选用倾斜体(oblique )替代。
选择倾斜体,如果当前字体没有可用的倾斜体版本,会选用斜体(italic )替代。 If one or more oblique faces are available in the chosen font family, the one that most closely matches the specified angle is chosen. If no oblique faces are available, the browser will synthesize an oblique version of the font by slanting a normal face by the specified amount. Valid values are degree values of -90deg to 90deg inclusive. If an angle is not specified, an angle of 14 degrees is used. Positive values are slanted to the end of the line, while negative values are slanted towards the beginning.

In general, for a requested angle of 14 degrees or greater, larger angles are prefered; otherwise, smaller angles are preferred (see the spec's font matching section for the precise algorithm).


可变字体(Variable font)可以精确控制 oblique 字体的倾斜程度。You can select this using the <angle> modifier for the oblique keyword.

For TrueType or OpenType variable fonts, the "slnt" variation is used to implement varying slant angles for oblique, and the "ital" variation with a value of 1 is used to implement italic values. See font-variation-settings.

For the example below to work, you'll need a browser that supports the CSS Fonts Level 4 syntax in which font-style: oblique can accept an <angle>.


    <input type="range" id="slant" name="slant" min="-90" max="90" />
    <label for="slant">Slant</label>
<div class="container">
    <p class="sample"> would not be wonderful to meet a Megalosaurus, forty feet long or so, waddling like an elephantine lizard up Holborn Hill.</p>


AmstelvarAlpha-VF 由 David Berlow 制作:

@font-face {
  src: url('');
  font-style: normal;

label {
  font: 1rem monospace;

.container {
  max-height: 150px;
  overflow: scroll;

.sample {
  font: 2rem 'AmstelvarAlpha', sans-serif;


let slantLabel = document.querySelector('label[for="slant"]');
let slantInput = document.querySelector('#slant');
let sampleText = document.querySelector('.sample');

function update() {
  let slant = `oblique ${slantInput.value}deg`;
  slantLabel.textContent = `font-style: ${slant};`; = slant;

slantInput.addEventListener('input', update);



normal | italic | oblique <angle>?


示例展示了不同的 font-style 值。CSS 看起来像这样:

.normal {
  font-style: normal;

.italic {
  font-style: italic;

.oblique {
  font-style: oblique;

请注意,不是所有的字体都有确切的 obliqueitalic 字形,即便如此,浏览器也会通过使用现有的字形来模拟所缺少的字形。下面是一个使用这两种字形渲染字体的示例:


Large sections of text set with a font-style value of italic may be difficult for people with cognitive concerns such as Dyslexia to read.


规范 状态 注释
CSS Fonts Module Level 4
Working Draft Adds the ability to specify an angle after oblique
CSS Fonts Module Level 3
Candidate Recommendation 没有变化
CSS Level 2 (Revision 1)
Recommendation 没有变化
CSS Level 1
Recommendation 初始定义
适用元素all elements. It also applies to ::first-letter and ::first-line.
计算值as specified
Animation typediscrete


Update compatibility data on GitHub
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
font-styleChrome Full support 1Edge Full support 12Firefox Full support 1
Full support 1
Notes Before Firefox 44, oblique was not distinguished from italic.
IE Full support 4Opera Full support 7Safari Full support 1WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4
Full support 4
Notes Before Firefox 44, oblique was not distinguished from italic.
Opera Android Full support 10.1Safari iOS Full support 1Samsung Internet Android Full support 1.0
oblique can accept an <angle>Chrome No support NoEdge No support NoFirefox Full support 61IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 61Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No


Full support  
Full support
No support  
No support
See implementation notes.
See implementation notes.

[1] 在 Firefox 44 之前,Gecko 并不对 obliqueitalic 字形做出区分。在那之后,如果有可用的字形,它将使用正确的字形。