aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/svg/attribute/font-family
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/svg/attribute/font-family
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/svg/attribute/font-family')
-rw-r--r--files/zh-cn/web/svg/attribute/font-family/index.html49
1 files changed, 49 insertions, 0 deletions
diff --git a/files/zh-cn/web/svg/attribute/font-family/index.html b/files/zh-cn/web/svg/attribute/font-family/index.html
new file mode 100644
index 0000000000..7fa86002d6
--- /dev/null
+++ b/files/zh-cn/web/svg/attribute/font-family/index.html
@@ -0,0 +1,49 @@
+---
+title: font-family
+slug: Web/SVG/Attribute/font-family
+tags:
+ - SVG属性
+translation_of: Web/SVG/Attribute/font-family
+---
+<p>« <a href="/en/SVG/Attribute" title="en/SVG/Attribute">SVG Attribute reference home</a></p>
+<p><code>font-family</code> 属性(attribute) 指出哪个字体集将被用来渲染文字, 在带优先级的字体集名称列表被指定,还有或没有泛指的字符集名称。(specified as a prioritized list of font family names and/or generic family names)。</p>
+<p>作为一个表现层的属性,<code>font-family</code>属性也可以被直接用在CSS样式表中,详见 {{ cssxref("font-family","CSS font-family") }} 。</p>
+<h2 id="使用上下文">使用上下文</h2>
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="row">分类</th>
+ <td>Presentation attribute</td>
+ </tr>
+ <tr>
+ <th scope="row">值</th>
+ <td>[[&lt;family-name&gt; | &lt;generic-family&gt;],]* [&lt;family-name&gt; | &lt;generic-family&gt;] | inherit</td>
+ </tr>
+ <tr>
+ <th scope="row">可动画Animatable</th>
+ <td>Yes</td>
+ </tr>
+ <tr>
+ <th scope="row">规范文档</th>
+ <td><a class="external" href="http://www.w3.org/TR/SVG11/text.html#FontFamilyProperty" title="http://www.w3.org/TR/SVG11/text.html#FontFamilyProperty">SVG 1.1 (2nd Edition)</a></td>
+ </tr>
+ </tbody>
+</table>
+<h2 id="例子">例子</h2>
+<h4 id="css">css</h4>
+<pre>p.class1{font-family:"Times New Roman",Times,serif;}
+p.class2{font-family:Arial,Helvetica;}
+</pre>
+<h4 id="html">html</h4>
+<pre class="brush: html">&lt;p class="class1"&gt;This is a paragraph, shown in the Times New Roman font.&lt;/p&gt;
+&lt;p class="class2"&gt;This is a paragraph, shown in the Arial font.&lt;/p&gt;
+</pre>
+<h2 id="元素">元素</h2>
+<p>以下元素可以使用<code>font-family</code> 属性(attribute)</p>
+<ul>
+ <li><a href="/en/SVG/Element#Text_content_elements" title="en/SVG/Element#Text_content_elements">Text content elements</a> »</li>
+</ul>
+<h2 id="另见">另见</h2>
+<ul>
+ <li>{{ cssxref("font-family","CSS font-family") }}</li>
+</ul>