Skip to content

Commit

Permalink
convert to markdown for svg zh-CN
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 committed Aug 11, 2022
1 parent b2ea3c1 commit cd71fc5
Show file tree
Hide file tree
Showing 120 changed files with 6,188 additions and 7,913 deletions.
294 changes: 158 additions & 136 deletions files/zh-cn/web/svg/applying_svg_effects_to_html_content/index.md

Large diffs are not rendered by default.

63 changes: 23 additions & 40 deletions files/zh-cn/web/svg/attribute/accent-height/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,28 @@ title: accent-height
slug: Web/SVG/Attribute/accent-height
translation_of: Web/SVG/Attribute/accent-height
---
<p>« 回到 SVG 属性指南首页</p>

<p>此属性定义从原点到重点字符顶部的距离,通过字体坐标系内的距离测量。</p>

<p>若未定义该属性,那么该属性就会被设置为{{ SVGAttr("ascent") }}。</p>

<h2 id="Usage_context">Usage context</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="row">Categories</th>
<td>None</td>
</tr>
<tr>
<th scope="row">Value</th>
<td><a href="/en/SVG/Content_type#Length">&lt;number&gt;</a></td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>No</td>
</tr>
<tr>
<th scope="row">Normative document</th>
<td><a href="http://www.w3.org/TR/SVG/fonts.html#FontFaceElementAccentHeightAttribute">SVG 1.1 (2nd Edition)</a></td>
</tr>
</tbody>
</table>

<p>{{ page("/en-US/docs/SVG/Content_type","Number") }}</p>

<h2 id="Elements">Elements</h2>

<p>The following elements can use the <code>accent-height</code> attribute</p>

<ul>
<li>{{ SVGElement("font-face") }}</li>
</ul>

<h2 id="规范">规范</h2>
« 回到 SVG 属性指南首页

此属性定义从原点到重点字符顶部的距离,通过字体坐标系内的距离测量。

若未定义该属性,那么该属性就会被设置为{{ SVGAttr("ascent") }}。

## Usage context

| Categories | None |
| ------------------ | ------------------------------------------------------------------------------------------------- |
| Value | [<number>](/en/SVG/Content_type#Length) |
| Animatable | No |
| Normative document | [SVG 1.1 (2nd Edition)](http://www.w3.org/TR/SVG/fonts.html#FontFaceElementAccentHeightAttribute) |

{{ page("/en-US/docs/SVG/Content_type","Number") }}

## Elements

The following elements can use the `accent-height` attribute

- {{ SVGElement("font-face") }}

## 规范

{{Specifications}}
81 changes: 31 additions & 50 deletions files/zh-cn/web/svg/attribute/accumulate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,36 @@ tags:
- 需要示例
translation_of: Web/SVG/Attribute/accumulate
---
<p>« <a href="/en/SVG/Attribute">SVG 属性参考主页</a></p>

<p>该属性控制了动画是否是累加的。</p>

<p>在原来的结果的基础上重复动画的时候,它通常很有用,每一次循环都累加。这个属性告诉动画是否是每次循环,前一个动画属性值要加上去。</p>

<h2 id="用法">用法</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="row">类别</th>
<td>动画累加属性</td>
</tr>
<tr>
<th scope="row">值</th>
<td><strong>none</strong> | sum</td>
</tr>
<tr>
<th scope="row">可变性</th>
<td>No</td>
</tr>
<tr>
<th scope="row">规范文档</th>
<td><a href="http://www.w3.org/TR/SVG/animate.html#AdditionAttributes">SVG 1.1 (2nd Edition)</a></td>
</tr>
</tbody>
</table>

<dl>
<dt>sum</dt>
<dd>指定第一次循环后的每次循环建立在上次循环的终值上。</dd>
<dt>none</dt>
<dd>指定重复循环是不累加的。这是默认值。</dd>
</dl>

<h2 id="示例">示例</h2>

<h2 id="元素">元素</h2>

<p>以下元素可以使用<code>additive</code>属性:</p>

<ul>
<li>{{ SVGElement("animate") }}</li>
<li>{{ SVGElement("animateColor") }}</li>
<li>{{ SVGElement("animateMotion") }}</li>
<li>{{ SVGElement("animateTransform") }}</li>
</ul>

<h2 id="规范">规范</h2>
« [SVG 属性参考主页](/en/SVG/Attribute)

该属性控制了动画是否是累加的。

在原来的结果的基础上重复动画的时候,它通常很有用,每一次循环都累加。这个属性告诉动画是否是每次循环,前一个动画属性值要加上去。

## 用法

| 类别 | 动画累加属性 |
| -------- | --------------------------------------------------------------------------------- |
|| **none** \| sum |
| 可变性 | No |
| 规范文档 | [SVG 1.1 (2nd Edition)](http://www.w3.org/TR/SVG/animate.html#AdditionAttributes) |

- sum
- : 指定第一次循环后的每次循环建立在上次循环的终值上。
- none
- : 指定重复循环是不累加的。这是默认值。

## 示例

## 元素

以下元素可以使用`additive`属性:

- {{ SVGElement("animate") }}
- {{ SVGElement("animateColor") }}
- {{ SVGElement("animateMotion") }}
- {{ SVGElement("animateTransform") }}

## 规范

{{Specifications}}
116 changes: 49 additions & 67 deletions files/zh-cn/web/svg/attribute/alignment-baseline/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,90 +7,72 @@ tags:
- 需要兼容性表
translation_of: Web/SVG/Attribute/alignment-baseline
---
<p>« <a href="/en/SVG/Attribute">SVG 属性参考主页</a></p>

<p><code>alignment-baseline</code>属性指定了一个对象如何相对于它的父元素对齐。这个属性指定了该元素的基线对齐到相应的父元素的基线。举个例子,允许罗马文字中的字母表基线在字体大小发生变化时保持一致。它的默认值是 baseline,与该<code>alignment-baseline</code>属性的计算值同名。</p>

<p>作为一个外观属性,它还可以直接作为 CSS 样式表内部的属性使用。请阅读{{ cssxref("alignment-baseline","CSS alignment-baseline") }}以了解更多信息。</p>

<h2 id="用法">用法</h2>

<table class="standard-table">
<tbody>
<tr>
<th scope="row">类别</th>
<td>外观属性</td>
</tr>
<tr>
<th scope="row">值</th>
<td><strong>auto</strong> | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | inherit</td>
</tr>
<tr>
<th scope="row">可变性</th>
<td>Yes</td>
</tr>
<tr>
<th scope="row">规范文档</th>
<td><a href="http://www.w3.org/TR/SVG11/text.html#AlignmentBaselineProperty">SVG 1.1 (2nd Edition)</a></td>
</tr>
</tbody>
</table>

<h2 id="示例">示例</h2>

<pre><code>&lt;?xml version="1.0"?&gt;
&lt;svg width="300" height="120" viewBox="0 0 300 120"
xmlns="http://www.w3.org/2000/svg" version="1.1"&gt;

&lt;!-- Materialisation of anchors --&gt;
&lt;path d="M60,10 L60,110
« [SVG 属性参考主页](/en/SVG/Attribute)

`alignment-baseline`属性指定了一个对象如何相对于它的父元素对齐。这个属性指定了该元素的基线对齐到相应的父元素的基线。举个例子,允许罗马文字中的字母表基线在字体大小发生变化时保持一致。它的默认值是 baseline,与该`alignment-baseline`属性的计算值同名。

作为一个外观属性,它还可以直接作为 CSS 样式表内部的属性使用。请阅读{{ cssxref("alignment-baseline","CSS alignment-baseline") }}以了解更多信息。

## 用法

| 类别 | 外观属性 |
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|| **auto** \| baseline \| before-edge \| text-before-edge \| middle \| central \| after-edge \| text-after-edge \| ideographic \| alphabetic \| hanging \| mathematical \| inherit |
| 可变性 | Yes |
| 规范文档 | [SVG 1.1 (2nd Edition)](http://www.w3.org/TR/SVG11/text.html#AlignmentBaselineProperty) |

## 示例

```plain
<?xml version="1.0"?>
<svg width="300" height="120" viewBox="0 0 300 120"
xmlns="http://www.w3.org/2000/svg" version="1.1">
<!-- Materialisation of anchors -->
<path d="M60,10 L60,110
M30,10 L300,10
M30,65 L300,65
M30,110 L300,110
" stroke="grey" /&gt;
" stroke="grey" />
&lt;!-- Anchors in action --&gt;
&lt;text alignment-baseline="hanging"
x="60" y="10"&gt;A hanging&lt;/text&gt;
<!-- Anchors in action -->
<text alignment-baseline="hanging"
x="60" y="10">A hanging</text>
&lt;text alignment-baseline="middle"
x="60" y="65"&gt;A middle&lt;/text&gt;
<text alignment-baseline="middle"
x="60" y="65">A middle</text>
&lt;text alignment-baseline="baseline"
x="60" y="110"&gt;A baseline&lt;/text&gt;
<text alignment-baseline="baseline"
x="60" y="110">A baseline</text>
&lt;!-- Materialisation of anchors --&gt;
&lt;circle cx="60" cy="10" r="3" fill="red" /&gt;
&lt;circle cx="60" cy="65" r="3" fill="red" /&gt;
&lt;circle cx="60" cy="110" r="3" fill="red" /&gt;
<!-- Materialisation of anchors -->
<circle cx="60" cy="10" r="3" fill="red" />
<circle cx="60" cy="65" r="3" fill="red" />
<circle cx="60" cy="110" r="3" fill="red" />
&lt;style&gt;&lt;![CDATA[
<style><![CDATA[
text{
font: bold 36px Verdana, Helvetica, Arial, sans-serif;
}
]]&gt;&lt;/style&gt;
&lt;/svg&gt;</code>
</pre>
]]></style>
</svg>
```

<h2 id="元素">元素</h2>
## 元素

<p>下列元素使用<code>alignment-baseline 属性:</code></p>
下列元素使用`alignment-baseline 属性:`

<ul>
<li>{{ SVGElement("tspan") }}</li>
<li>{{ SVGElement("tref") }}</li>
<li>{{ SVGElement("altGlyph") }}</li>
<li>{{ SVGElement("textPath") }}</li>
</ul>
- {{ SVGElement("tspan") }}
- {{ SVGElement("tref") }}
- {{ SVGElement("altGlyph") }}
- {{ SVGElement("textPath") }}

<p>如果对象要在别的元素中对齐(比如在{{ SVGElement("text") }}元素中),请阅读{{ SVGAttr("dominant-baseline") }}。</p>
如果对象要在别的元素中对齐(比如在{{ SVGElement("text") }}元素中),请阅读{{ SVGAttr("dominant-baseline") }}。

<h2 id="规范">规范</h2>
## 规范

{{Specifications}}

<h2 id="参见">参见</h2>
## 参见

<ul>
<li>{{ cssxref("alignment-baseline","CSS alignment-baseline") }}</li>
</ul>
- {{ cssxref("alignment-baseline","CSS alignment-baseline") }}
69 changes: 27 additions & 42 deletions files/zh-cn/web/svg/attribute/attributename/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,60 +7,45 @@ tags:
- 需要兼容性表
translation_of: Web/SVG/Attribute/attributeName
---
<p>« <a href="/en/SVG/Attribute">SVG 属性参考主页</a></p>
« [SVG 属性参考主页](/en/SVG/Attribute)

<p>该属性标识了在一个动画动作环节中,父元素的需要被改变的属性名。</p>
该属性标识了在一个动画动作环节中,父元素的需要被改变的属性名。

<h2 id="用法">用法</h2>
## 用法

<table class="standard-table">
<tbody>
<tr>
<th scope="row">类别</th>
<td>动画属性目标属性</td>
</tr>
<tr>
<th scope="row">值</th>
<td>&lt;attributeName&gt;</td>
</tr>
<tr>
<th scope="row">可变性</th>
<td>No</td>
</tr>
<tr>
<th scope="row">规范文档</th>
<td><a href="http://www.w3.org/TR/SVG/animate.html#AttributeNameAttribute">SVG 1.1 (2nd Edition)</a></td>
</tr>
</tbody>
</table>
| 类别 | 动画属性目标属性 |
| -------- | ------------------------------------------------------------------------------------- |
|| <attributeName> |
| 可变性 | No |
| 规范文档 | [SVG 1.1 (2nd Edition)](http://www.w3.org/TR/SVG/animate.html#AttributeNameAttribute) |

<h2 id="示例">示例</h2>
## 示例

<p>下面的示例使用了 y 作为<code>attributeName</code>,通过改变一个矩形在 Y 轴上的位置来变动这个矩形。</p>
下面的示例使用了 y 作为`attributeName`,通过改变一个矩形在 Y 轴上的位置来变动这个矩形。

<pre class="brush: xml">&lt;?xml version="1.0"?&gt;
&lt;svg width="250" height="250"
```xml
<?xml version="1.0"?>
<svg width="250" height="250"
viewPort="0 0 250 250" version="1.1"
xmlns="http://www.w3.org/2000/svg"&gt;
&lt;rect x="50" y="50" width="100" height="100"&gt;
&lt;animate attributeType="XML"
xmlns="http://www.w3.org/2000/svg">
<rect x="50" y="50" width="100" height="100">
<animate attributeType="XML"
attributeName="y"
from="0" to="50"
dur="5s"/&gt;
&lt;/rect&gt;
&lt;/svg&gt;</pre>
dur="5s"/>
</rect>
</svg>
```

<h2 id="元素">元素</h2>
## 元素

<p>下列元素可以使用<code>attributeName</code>属性:</p>
下列元素可以使用`attributeName`属性:

<ul>
<li>{{ SVGElement("animate") }}</li>
<li>{{ SVGElement("animateColor") }}</li>
<li>{{ SVGElement("animateTransform") }}</li>
<li>{{ SVGElement("set") }}</li>
</ul>
- {{ SVGElement("animate") }}
- {{ SVGElement("animateColor") }}
- {{ SVGElement("animateTransform") }}
- {{ SVGElement("set") }}

<h2 id="规范">规范</h2>
## 规范

{{Specifications}}
Loading

0 comments on commit cd71fc5

Please sign in to comment.