aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/transform-function/scaley/index.html
diff options
context:
space:
mode:
authorMDN <actions@users.noreply.github.com>2022-03-19 00:13:08 +0000
committerMDN <actions@users.noreply.github.com>2022-03-19 00:13:08 +0000
commit9bf6693b2edd5281c1577856895c55653a41dc01 (patch)
tree0143e1d1d5c95776e42d8d9afdddedb13a0827c1 /files/zh-cn/web/css/transform-function/scaley/index.html
parent376471eb81e0a3dc263128f834e3c8c22bb9b4d6 (diff)
downloadtranslated-content-9bf6693b2edd5281c1577856895c55653a41dc01.tar.gz
translated-content-9bf6693b2edd5281c1577856895c55653a41dc01.tar.bz2
translated-content-9bf6693b2edd5281c1577856895c55653a41dc01.zip
[CRON] sync translated content
Diffstat (limited to 'files/zh-cn/web/css/transform-function/scaley/index.html')
-rw-r--r--files/zh-cn/web/css/transform-function/scaley/index.html92
1 files changed, 92 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/transform-function/scaley/index.html b/files/zh-cn/web/css/transform-function/scaley/index.html
new file mode 100644
index 0000000000..42298ee377
--- /dev/null
+++ b/files/zh-cn/web/css/transform-function/scaley/index.html
@@ -0,0 +1,92 @@
+---
+title: scaleY()
+slug: Web/CSS/transform-function/scaleY
+tags:
+ - 'transform: rotateX(180deg);'
+ - 'transform: scaleY(-1);'
+translation_of: Web/CSS/transform-function/scaleY()
+original_slug: Web/CSS/transform-function/scaleY()
+---
+<div>{{CSSRef}}</div>
+
+<p>The <strong><code>scaleY()</code></strong> <a href="/en-US/docs/Web/CSS">CSS</a> function defines a transformation that resizes an element along the y-axis (vertically). Its result is a {{cssxref("&lt;transform-function&gt;")}} data type.</p>
+
+<p><img src="https://mdn.mozillademos.org/files/12119/scaleY.png" style="height: 381px; width: 365px;"></p>
+
+<p>It modifies the ordinate of each element point by a constant factor, except when the scale factor is 1, in which case the function is the identity transform. The scaling is not isotropic, and the angles of the element are not conserved. <code>scaleY(-1)</code> defines an <a class="external" href="http://en.wikipedia.org/wiki/Axial_symmetry">axial symmetry</a>, with a horizontal axis passing through the origin (as specified by the {{cssxref("transform-origin")}} property).</p>
+
+<div class="note">
+<p><strong>Note:</strong> <code>scaleY(sy)</code> is equivalent to <code><a href="/en-US/docs/Web/CSS/transform-function/scale">scale</a>(1, sy)</code> or <code><a href="/en-US/docs/Web/CSS/transform-function/scale3d">scale3d</a>(1, sy, 1)</code>.</p>
+
+<p><code>transform: rotateX(180deg);</code>  === <code>transform: scaleY(-1);</code></p>
+</div>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox notranslate">scaleY(s)
+</pre>
+
+<h3 id="Values">Values</h3>
+
+<dl>
+ <dt><code>s</code></dt>
+ <dd>Is a {{cssxref("&lt;number&gt;")}} representing the scaling factor to apply on the ordinate of each point of the element.</dd>
+</dl>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Cartesian coordinates on ℝ<sup>2</sup></th>
+ <th scope="col">Homogeneous coordinates on ℝℙ<sup>2</sup></th>
+ <th scope="col">Cartesian coordinates on ℝ<sup>3</sup></th>
+ <th scope="col">Homogeneous coordinates on ℝℙ<sup>3</sup></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td colspan="1" rowspan="2"><math> <mfenced><mtable><mtr>1<mtd>0</mtd></mtr> <mtr><mtd>0</mtd><mtd>s</mtd></mtr> </mtable> </mfenced> </math></td>
+ <td><math> <mfenced><mtable><mtr>1<mtd>0</mtd><mtd>0</mtd></mtr><mtr>0<mtd>s</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd></mtr></mtable> </mfenced> </math></td>
+ <td colspan="1" rowspan="2"><math> <mfenced><mtable><mtr>1<mtd>0</mtd><mtd>0</mtd></mtr><mtr>0<mtd>s</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd></mtr></mtable> </mfenced> </math></td>
+ <td colspan="1" rowspan="2"><math> <mfenced><mtable><mtr>1<mtd>0</mtd><mtd>0</mtd><mtd>0</mtd></mtr><mtr>0<mtd>s</mtd><mtd>0</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd><mtd>0</mtd></mtr><mtr><mtd>0</mtd><mtd>0</mtd><mtd>0</mtd><mtd>1</mtd></mtr></mtable> </mfenced> </math></td>
+ </tr>
+ <tr>
+ <td><code>[1 0 0 s 0 0]</code></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Examples">Examples</h2>
+
+<h3 id="HTML">HTML</h3>
+
+<pre class="brush: html notranslate">&lt;div&gt;Normal&lt;/div&gt;
+&lt;div class="scaled"&gt;Scaled&lt;/div&gt;</pre>
+
+<h3 id="CSS">CSS</h3>
+
+<pre class="brush: css notranslate">div {
+ width: 80px;
+ height: 80px;
+ background-color: skyblue;
+}
+
+.scaled {
+ transform: scaleY(0.6);
+ background-color: pink;
+}
+</pre>
+
+<h3 id="Result">Result</h3>
+
+<p>{{EmbedLiveSample("Examples", 200, 200)}}</p>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+<p>Please see the <code><a href="/en-US/docs/Web/CSS/transform-function#Browser_compatibility">&lt;transform-function&gt;</a></code> data type for compatibility info.</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{cssxref("transform")}}</li>
+ <li>{{cssxref("&lt;transform-function&gt;")}}</li>
+</ul>