aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/@font-face/font-family/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/css/@font-face/font-family/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/css/@font-face/font-family/index.html')
-rw-r--r--files/zh-cn/web/css/@font-face/font-family/index.html114
1 files changed, 114 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/@font-face/font-family/index.html b/files/zh-cn/web/css/@font-face/font-family/index.html
new file mode 100644
index 0000000000..1002d02fb4
--- /dev/null
+++ b/files/zh-cn/web/css/@font-face/font-family/index.html
@@ -0,0 +1,114 @@
+---
+title: font-family
+slug: Web/CSS/@font-face/font-family
+translation_of: Web/CSS/@font-face/font-family
+---
+<div>{{CSSRef}}</div>
+
+<div><strong><code>font-family</code></strong><code>属性允许我们为页面上的字体指定一个由</code>{{cssxref("@font-face")}} 规则定义的字体族</div>
+
+<p>The <strong><code>font-family</code></strong> CSS descriptor allows authors to specify the font family for the font specified in an {{cssxref("@font-face")}} rule.</p>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="brush: css">/* &lt;string&gt; values */
+font-family: "font family";
+font-family: 'another font family';
+
+/* &lt;IDENT&gt; value */
+font-family: examplefont;
+</pre>
+
+<h3 id="取值">取值</h3>
+
+<dl>
+ <dt><code>&lt;family-name&gt;</code></dt>
+ <dd>指定字体族名称</dd>
+</dl>
+
+<h3 id="Formal_syntax">Formal syntax</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="示例">示例</h2>
+
+<pre class="brush: css">@font-face {
+ font-family: examplefont;
+ src: url('examplefont.ttf');
+}
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('CSS3 Fonts', '#font-family-desc', 'font-family')}}</td>
+ <td>{{Spec2('CSS3 Fonts')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatChrome("4")}}</td>
+ <td>12.0</td>
+ <td>{{CompatGeckoDesktop("1.9.1")}}</td>
+ <td>{{CompatIE("6.0")}}</td>
+ <td>{{CompatOpera("9.0")}}</td>
+ <td>{{CompatSafari("3.1")}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mini</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatAndroid("2.2")}}</td>
+ <td>{{CompatGeckoMobile("1.9.1")}}</td>
+ <td>{{CompatIE("10.0")}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatOpera("12.0")}}</td>
+ <td>{{CompatSafari("3.1")}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>