diff --git a/files/zh-cn/web/svg/attribute/accent-height/index.md b/files/zh-cn/web/svg/attribute/accent-height/index.md index 1973b1cbcfc751..3f7ce4f01777bb 100644 --- a/files/zh-cn/web/svg/attribute/accent-height/index.md +++ b/files/zh-cn/web/svg/attribute/accent-height/index.md @@ -3,28 +3,46 @@ title: accent-height slug: Web/SVG/Attribute/accent-height --- -« 回到 SVG 属性指南首页 +{{SVGRef}}{{deprecated_header}} -此属性定义从原点到重点字符顶部的距离,通过字体坐标系内的距离测量。 +**`accent-height`** 属性定义从原点到重点字符顶部的距离,通过字体坐标系内的距离测量。 -若未定义该属性,那么该属性就会被设置为{{ SVGAttr("ascent") }}。 +你可以将该属性与以下 SVG 元素一起使用: -## Usage context +- {{SVGElement("font-face")}} -| Categories | None | -| ------------------ | ------------------------------------------------------------------------------------------------- | -| Value | [\](/zh-CN/SVG/Content_type#Length) | -| Animatable | No | -| Normative document | [SVG 1.1 (2nd Edition)](http://www.w3.org/TR/SVG/fonts.html#FontFaceElementAccentHeightAttribute) | +## font-face -{{ page("/en-US/docs/SVG/Content_type","Number") }} +对于 {{SVGElement("font-face")}} 元素,`accent-height` 定义从原点到重音字符顶部的距离,通过字体坐标系内的距离测量。 -## Elements - -The following elements can use the `accent-height` attribute - -- {{ SVGElement("font-face") }} + + + + + + + + + + + + + + + +
+ <number> +
默认值{{SVGAttr("ascent")}} 的值
可变性
## 规范 {{Specifications}} + +## 浏览器兼容性 + +{{Compat}} + +## 参见 + +- {{SVGAttr("cap-height")}} +- {{SVGAttr("x-height")}} diff --git a/files/zh-cn/web/svg/attribute/fy/index.md b/files/zh-cn/web/svg/attribute/fy/index.md index cb3d8088b83af4..b21fecf5ec36b4 100644 --- a/files/zh-cn/web/svg/attribute/fy/index.md +++ b/files/zh-cn/web/svg/attribute/fy/index.md @@ -3,53 +3,144 @@ title: fy slug: Web/SVG/Attribute/fy --- -« [SVG 属性参考主页](/zh-CN/SVG/Attribute) +{{SVGRef}} -对于 {{ SVGElement("radialGradient") }} 元素,此属性用来定义径向渐变的焦点的 y 轴坐标。如果该属性没有被定义,就假定它与中心点是同一位置。 +**`fy`** 属性用来定义径向渐变的焦点的 y 轴坐标。 -## 用法 - -| 类别 | 无 | -| -------- | ---------------------------------------------------------------------------------------------------------------------------- | -| 值 | [\](/zh-CN/SVG/Content_type#Coordinate) | -| 可变性 | 非 | -| 规范文档 | [SVG 1.1 (2nd Edition): The radialGradient element](http://www.w3.org/TR/SVG/pservers.html#RadialGradientElementCXAttribute) | +你可以将该属性与以下 SVG 元素一起使用: -{{ page("/en/SVG/Content_type","Coordinate") }} +- {{SVGElement("radialGradient")}} ## 示例 -```html - +### 示例 1 - +```css hidden +html, +body, +svg { + height: 100%; +} +``` + +```html + - - - - + + + + + + + + - + + + +``` + +{{EmbedLiveSample("示例 1", "480", "200")}} - - - - (fx,fy) - (cx,cy) +### 示例 2 +```html + + + + + + + + + + + + + + + (fx,fy) + + + (cx,cy) + ``` -## 元素 +{{EmbedLiveSample("示例 2", "200", "250")}} -下列元素可以使用 `fy` 属性: +## 用法 -- {{ SVGElement("radialGradient") }} + + + + + + + + + + + + + + + +
{{cssxref("length")}}
默认值 + 与元素的 {{SVGAttr("cy")}} 表现值一致,不论 + cy 的值是继承与否。 +
可变性
## 规范 {{Specifications}} + +## 浏览器兼容性 + +{{Compat}} diff --git a/files/zh-cn/web/svg/attribute/height/index.md b/files/zh-cn/web/svg/attribute/height/index.md index 486e86a3665108..269ef49ebf2e11 100644 --- a/files/zh-cn/web/svg/attribute/height/index.md +++ b/files/zh-cn/web/svg/attribute/height/index.md @@ -3,20 +3,11 @@ title: height slug: Web/SVG/Attribute/height --- -« [SVG 属性参考主页](/zh-CN/SVG/Attribute) +{{SVGRef}} 该属性在用户坐标系统中标识了一个垂直长度。该坐标的确切效果依赖于每个元素。大多数时候,它体现引用元素的矩形区域的高度(请阅读每个元素的文档以了解例外情况)。 -除了{{ SVGElement("svg") }}元素之外,别的元素都必须指定该属性,{{ SVGElement("svg") }}的高度默认是**100%**,而{{ SVGElement("filter") }}元素以及{{ SVGElement("mask") }}元素的默认高度是**120%**。 - -## 用法 - -| 类别 | 无 | -| ------ | --------------------------------------- | -| 值 | [\](/zh-CN/SVG/Content_type#Length) | -| 可变性 | Yes | - -{{ page("/zh-CN/Content_type","Length") }} +除了{{ SVGElement("svg") }}元素之外,别的元素都必须指定该属性,{{ SVGElement("svg") }}的高度默认是 **100%**,而 {{ SVGElement("filter") }} 元素以及 {{ SVGElement("mask") }} 元素的默认高度是 **120%**。 ## 示例 @@ -44,6 +35,38 @@ slug: Web/SVG/Attribute/height - {{ SVGElement("use") }} - {{ SVGElement("mask") }} +## 用法 + +对于 {{SVGElement('use')}} 元素,`height` 定义了引用元素的垂直长度。 + + + + + + + + + + + + + + + + +
+ auto | + <length> + | + <percentage> +
默认值auto(视为 0
可变性
+ ## 规范 {{Specifications}} diff --git a/files/zh-cn/web/svg/attribute/repeatcount/index.md b/files/zh-cn/web/svg/attribute/repeatcount/index.md index f857c777b682bf..7dd3d1e4776c38 100644 --- a/files/zh-cn/web/svg/attribute/repeatcount/index.md +++ b/files/zh-cn/web/svg/attribute/repeatcount/index.md @@ -3,29 +3,46 @@ title: repeatCount slug: Web/SVG/Attribute/repeatCount --- -« [SVG 属性参考](/zh-CN/SVG/Attribute) +{{SVGRef}} 这个属性表示动画将发生的次数。 这个属性的值指定了重复的次数。它也可以包括用分数值表示。它的值必须大于 0。 -## 用法解释 - -| 类别 | 动画时间属性 | -| ---------- | ------------------------------------------------------- | -| Value | [\](/zh-CN/SVG/Content_type#Number) \| "indefinite" | -| Animatable | No | - -{{ page("/en/SVG/Content_type","Number") }} - -## Example - -## Elements +## 示例 The following elements can use the `repeatCount` attribute - [Animation elements](/zh-CN/SVG/Element#Animation) » +## 用法 + + + + + + + + + + + + + + + + +
{{cssxref("number")}} | indefinite
默认值
可变性
+ +- `` + - : 该值指定迭代次数。它可以使用分数值来表示部分迭代。分数值仅表示整个动画持续时间的一部分。值必须大于 `0`。 +- `indefinite` + - : 该值表示动画将无限期地重复(即直到文档结束)。 + ## 规范 {{Specifications}} + +## 浏览器兼容性 + +{{Compat}}