aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-14 12:18:12 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-14 12:18:12 -0500
commit869dd2069c695ee7040cd3261713212155819f42 (patch)
tree320a95de75a89686a9df006b90d923aa7fa0d551 /files/zh-cn/web/css
parenta5fcfafb665e96cae5d04dfba927db8dcdfd7f14 (diff)
downloadtranslated-content-869dd2069c695ee7040cd3261713212155819f42.tar.gz
translated-content-869dd2069c695ee7040cd3261713212155819f42.tar.bz2
translated-content-869dd2069c695ee7040cd3261713212155819f42.zip
final dump 2020-12-14
Diffstat (limited to 'files/zh-cn/web/css')
-rw-r--r--files/zh-cn/web/css/background-image/index.html16
-rw-r--r--files/zh-cn/web/css/flex/index.html10
-rw-r--r--files/zh-cn/web/css/gradient/index.html26
-rw-r--r--files/zh-cn/web/css/image/index.html86
4 files changed, 32 insertions, 106 deletions
diff --git a/files/zh-cn/web/css/background-image/index.html b/files/zh-cn/web/css/background-image/index.html
index c16d7aa861..cf4b302680 100644
--- a/files/zh-cn/web/css/background-image/index.html
+++ b/files/zh-cn/web/css/background-image/index.html
@@ -30,7 +30,7 @@ translation_of: Web/CSS/background-image
<p>可以提供由逗号分隔的多个值来指定多个背景图像:</p>
-<pre class="brush: css no-line-numbers">background-image:
+<pre class="brush: css no-line-numbers notranslate">background-image:
linear-gradient(to bottom, rgba(255,255,0,0.5), rgba(0,0,255,0.5)),
url('https://mdn.mozillademos.org/files/7693/catfront.png');</pre>
@@ -45,15 +45,15 @@ translation_of: Web/CSS/background-image
<h3 id="正规语法">正规语法</h3>
-<pre class="syntaxbox">{{csssyntax}}</pre>
+<pre class="syntaxbox notranslate">{{csssyntax}}</pre>
-<h2 id="示例">示例</h2>
+<h2 id="Examples" name="Examples">示例</h2>
<p>注意星星图片部分透明且位于猫图片上方.</p>
-<h3 id="HTML">HTML</h3>
+<h4 id="HTML">HTML</h4>
-<pre class="brush: html">&lt;div&gt;
+<pre class="brush: html notranslate">&lt;div&gt;
&lt;p class="catsandstars"&gt;
This paragraph is full of cats&lt;br /&gt;and stars.
&lt;/p&gt;
@@ -64,9 +64,9 @@ translation_of: Web/CSS/background-image
&lt;p&gt;And no more.&lt;/p&gt;
&lt;/div&gt;</pre>
-<h3 id="CSS">CSS</h3>
+<h4 id="CSS">CSS</h4>
-<pre class="brush: css">p {
+<pre class="brush: css notranslate">p {
font-size: 1.5em;
color: #FE7F88;
background-image: none;
@@ -86,7 +86,7 @@ div {
}
</pre>
-<h3 id="Result">Result</h3>
+<h4 id="运行结果">运行结果</h4>
<p>{{EmbedLiveSample('Examples')}}</p>
diff --git a/files/zh-cn/web/css/flex/index.html b/files/zh-cn/web/css/flex/index.html
index 9911e9c77d..295d7d9f34 100644
--- a/files/zh-cn/web/css/flex/index.html
+++ b/files/zh-cn/web/css/flex/index.html
@@ -65,9 +65,9 @@ flex: unset;
<p><strong>单值语法</strong>: 值必须为以下其中之一:</p>
<ul>
- <li>一个无单位<strong>数({{cssxref("&lt;number&gt;")}})</strong>: 它会被当作<code><a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex-grow">&lt;flex-grow&gt;</a>的值。</code></li>
+ <li>一个无单位<strong>数({{cssxref("&lt;number&gt;")}})</strong>: 它会被当作<code>flex:&lt;number&gt; 1 0;</code> <code><a href="/zh-CN/docs/Web/CSS/flex-shrink">&lt;flex-shrink&gt;</a></code>的值被假定为1,然后<code><a href="/zh-CN/docs/Web/CSS/flex-basis">&lt;flex-basis&gt;</a></code> 的值被假定为<code>0</code>。</li>
<li>一个有效的<strong>宽度({{cssxref("width")}})</strong>值: 它会被当作 <code><a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex-basis">&lt;flex-basis&gt;</a>的值。</code></li>
- <li>关键字<code><a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex$edit#none">none</a></code><font face="Open Sans, arial, x-locale-body, sans-serif">,</font><code>auto</code>或<code>initial</code>.</li>
+ <li>关键字<code><a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex#none">none</a></code><font face="Open Sans, arial, x-locale-body, sans-serif">,</font><code><a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex#auto">auto</a></code>或<code>initial</code>.</li>
</ul>
<p><strong>双值语法</strong>: 第一个值必须为一个无单位数,并且它会被当作 <code><a href="https://developer.mozilla.org/zh-CN/docs/Web/CSS/flex-grow">&lt;flex-grow&gt;</a></code> 的值。第二个值必须为以下之一:</p>
@@ -93,16 +93,16 @@ flex: unset;
</dl>
<dl>
- <dt><code>auto</code></dt>
+ <dt id="auto"><code>auto</code></dt>
<dd>元素会根据自身的宽度与高度来确定尺寸,但是会伸长并吸收 flex 容器中额外的自由空间,也会缩短自身来适应 flex 容器。这相当于将属性设置为 "<code>flex: 1 1 auto</code>".</dd>
- <dt><code>none</code></dt>
+ <dt id="none"><code>none</code></dt>
<dd>元素会根据自身宽高来设置尺寸。它是完全非弹性的:既不会缩短,也不会伸长来适应 flex 容器。相当于将属性设置为"<code>flex: 0 0 auto</code>"。</dd>
<dt><code>&lt;'flex-grow'&gt;</code></dt>
<dd>定义 flex 项目的 {{cssxref("flex-grow")}} 。负值无效。省略时默认值为 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">1</span></font>。 (初始值为 <code>0</code>)</dd>
<dt><code>&lt;'flex-shrink'&gt;</code></dt>
<dd>定义 flex 元素的 {{cssxref("flex-shrink")}} 。负值无效。省略时默认值为<code>1</code>。 (初始值为 <code>1</code>)</dd>
<dt><code>&lt;'flex-basis'&gt;</code></dt>
- <dd>定义 flex 元素的 {{cssxref("flex-basis")}} 属性。若值为<code>0</code>,则必须加上单位,以免被视作伸缩性。省略时默认值为 <code>auto</code>。(初始值为 <code>0</code>)</dd>
+ <dd>定义 flex 元素的 {{cssxref("flex-basis")}} 属性。若值为<code>0</code>,则必须加上单位,以免被视作伸缩性。省略时默认值为 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">0</span></font>。(初始值为 <font face="consolas, Liberation Mono, courier, monospace"><span style="background-color: rgba(220, 220, 220, 0.5);">auto</span></font>)</dd>
<dt>
<h3 id="描述">描述</h3>
</dt>
diff --git a/files/zh-cn/web/css/gradient/index.html b/files/zh-cn/web/css/gradient/index.html
index 8cb033cb7b..a27da647f1 100644
--- a/files/zh-cn/web/css/gradient/index.html
+++ b/files/zh-cn/web/css/gradient/index.html
@@ -21,16 +21,16 @@ translation_of: Web/CSS/gradient
<p>颜色值沿着一条隐式的直线逐渐过渡。由{{cssxref("linear-gradient", "linear-gradient()")}}产生。</p>
<div class="hidden">
-<pre class="brush: html">&lt;div class="linear-gradient"&gt;Linear gradient&lt;/div&gt;
+<pre class="brush: html notranslate">&lt;div class="linear-gradient"&gt;Linear gradient&lt;/div&gt;
</pre>
-<pre class="brush: css">div {
+<pre class="brush: css notranslate">div {
width: 240px;
height: 80px;
}</pre>
</div>
-<pre class="brush: css">.linear-gradient {
+<pre class="brush: css notranslate">.linear-gradient {
background: linear-gradient(to right,
red, orange, yellow, green, blue, indigo, violet);
}</pre>
@@ -44,16 +44,16 @@ translation_of: Web/CSS/gradient
<p>颜色值由一个中心点(原点)向外扩散并逐渐过渡到其他颜色值。由{{cssxref("radial-gradient", "radial-gradient()")}}函数产生。</p>
<div class="hidden">
-<pre class="brush: html">&lt;div class="radial-gradient"&gt;Radial gradient&lt;/div&gt;
+<pre class="brush: html notranslate">&lt;div class="radial-gradient"&gt;Radial gradient&lt;/div&gt;
</pre>
-<pre class="brush: css">div {
+<pre class="brush: css notranslate">div {
width: 240px;
height: 80px;
}</pre>
</div>
-<pre class="brush: css">.radial-gradient {
+<pre class="brush: css notranslate">.radial-gradient {
background: radial-gradient(red, yellow, rgb(30, 144, 255));
}
</pre>
@@ -67,18 +67,18 @@ translation_of: Web/CSS/gradient
<p>重复多次渐变图案直到足够填满指定元素。由 {{cssxref("repeating-linear-gradient", "repeating-linear-gradient()")}}和{{cssxref("repeating-radial-gradient", "repeating-radial-gradient()")}}函数产生。</p>
<div class="hidden">
-<pre class="brush: html">&lt;div class="linear-repeat"&gt;Repeating linear gradient&lt;/div&gt;
+<pre class="brush: html notranslate">&lt;div class="linear-repeat"&gt;Repeating linear gradient&lt;/div&gt;
&lt;br&gt;
&lt;div class="radial-repeat"&gt;Repeating radial gradient&lt;/div&gt;
</pre>
-<pre class="brush: css">div {
+<pre class="brush: css notranslate">div {
width: 240px;
height: 80px;
}</pre>
</div>
-<pre class="brush: css">.linear-repeat {
+<pre class="brush: css notranslate">.linear-repeat {
background: repeating-linear-gradient(to top left,
lightpink, lightpink 5px, white 5px, white 10px);
}
@@ -115,7 +115,11 @@ translation_of: Web/CSS/gradient
<h2 id="浏览器兼容性"><font face="x-locale-heading-primary, zillaslab, Palatino, Palatino Linotype, x-locale-heading-secondary, serif"><span style="font-size: 40px;"><strong>浏览器兼容性</strong></span></font></h2>
-<p>每一种渐变都有不同的兼容性,敬请查阅特定渐变的相关文献与资料以获取更多信息。</p>
+<div class="hidden">每一种渐变都有不同的兼容性,敬请查阅特定渐变的相关文献与资料以获取更多信息。</div>
+
+<div class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</div>
+
+<p>{{Compat("css.types.image.gradient")}}</p>
<h2 id="See_also">See also</h2>
@@ -123,5 +127,3 @@ translation_of: Web/CSS/gradient
<li><a href="/en-US/docs/CSS/Using_CSS_gradients" title="Using gradients">Using CSS gradients</a>,</li>
<li>渐变方程:{{cssxref("&lt;gradient&gt;")}}, {{cssxref("linear-gradient", "linear-gradient()")}}, {{cssxref("radial-gradient", "radial-gradient()")}}, {{cssxref("repeating-linear-gradient", "repeating-linear-gradient()")}}, {{cssxref("repeating-radial-gradient", "repeating-radial-gradient()")}};</li>
</ul>
-
-<p> </p>
diff --git a/files/zh-cn/web/css/image/index.html b/files/zh-cn/web/css/image/index.html
index c19fb0521e..99deceb577 100644
--- a/files/zh-cn/web/css/image/index.html
+++ b/files/zh-cn/web/css/image/index.html
@@ -81,7 +81,7 @@ translation_of: Web/CSS/image
<p>以下是有效的图像引用值:</p>
-<pre>url(test.jpg)                          url()方法, 只要test.jpg是图像文件
+<pre class="notranslate">url(test.jpg)                          url()方法, 只要test.jpg是图像文件
linear-gradient(to bottom, blue, red)  一个 &lt;gradient&gt;标签
element(#colonne3)                     页面的一部分, 使用了element()方法,
                                       如果 colonne3 是存在于页面中的一个元素id即可
@@ -89,7 +89,7 @@ element(#colonne3)                     页面的一部分,
<p>以下是无效的图像引用值:</p>
-<pre>cervin.jpg                             图像文件必须使用url()方法定义
+<pre class="notranslate">cervin.jpg                             图像文件必须使用url()方法定义
url(report.pdf)                       url()方法指向的文件链接必须是一个图像文件
element(#fakeid) 如果fakeid是一个不存在与页面的元素id
</pre>
@@ -117,87 +117,11 @@ element(#fakeid) 如果fakeid是一个不存在与页面
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<p>{{ CompatibilityTable() }}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Firefox (Gecko)</th>
- <th>Chrome</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td><code>&lt;uri&gt;</code></td>
- <td>{{ compatVersionUnknown() }}</td>
- <td>{{ compatVersionUnknown() }}</td>
- <td>{{ compatVersionUnknown() }}</td>
- <td>{{ compatVersionUnknown() }}</td>
- <td>{{ compatVersionUnknown() }}</td>
- </tr>
- <tr>
- <td><code>&lt;gradient&gt;</code></td>
- <td>{{ compatVersionUnknown() }}<br>
- limited to {{ cssxref("background-image") }} &amp; {{ cssxref("background") }}{{ property_prefix("-moz") }}</td>
- <td>{{ compatVersionUnknown() }}{{ property_prefix("-webkit") }}</td>
- <td>IE 10{{ property_prefix("-ms") }}</td>
- <td>{{ compatVersionUnknown() }}{{ property_prefix("-o") }}</td>
- <td>{{ compatVersionUnknown() }}{{ property_prefix("-webkit") }}</td>
- </tr>
- <tr>
- <td><code>element()</code></td>
- <td>4.0 (2.0) limited to {{ cssxref("background-image") }} &amp; {{ cssxref("background") }}{{ property_prefix("-moz") }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- </tr>
- </tbody>
-</table>
+<div class="hidden">
+<p>The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p>
</div>
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>Android</th>
- <th>IE Phone</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td><code>&lt;uri&gt;</code></td>
- <td>{{ compatVersionUnknown() }}</td>
- <td>{{ compatVersionUnknown() }}</td>
- <td>{{ compatVersionUnknown() }}</td>
- <td>{{ compatVersionUnknown() }}</td>
- <td>{{ compatVersionUnknown() }}</td>
- </tr>
- <tr>
- <td><code>&lt;gradient&gt;</code></td>
- <td>{{ compatVersionUnknown() }}<br>
- limited to {{ cssxref("background-image") }} &amp; {{ cssxref("background") }}{{ property_prefix("-moz") }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- </tr>
- <tr>
- <td><code>element()</code></td>
- <td>4.0 (2.0) limited to {{ cssxref("background-image") }} &amp; {{ cssxref("background") }}{{ property_prefix("-moz") }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- <td>{{ compatUnknown() }}</td>
- </tr>
- </tbody>
-</table>
-</div>
+<p>{{Compat("css.types.image")}}</p>
<h2 id="参阅:">参阅:</h2>