aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/-webkit-mask-attachment
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/css/-webkit-mask-attachment
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/css/-webkit-mask-attachment')
-rw-r--r--files/zh-cn/web/css/-webkit-mask-attachment/index.html103
1 files changed, 103 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/-webkit-mask-attachment/index.html b/files/zh-cn/web/css/-webkit-mask-attachment/index.html
new file mode 100644
index 0000000000..82e4440a9f
--- /dev/null
+++ b/files/zh-cn/web/css/-webkit-mask-attachment/index.html
@@ -0,0 +1,103 @@
+---
+title: '-webkit-mask-attachment'
+slug: Web/CSS/-webkit-mask-attachment
+translation_of: Web/CSS/-webkit-mask-attachment
+---
+<div>{{CSSRef}}{{Non-standard_header}}</div>
+
+<p id="Summary">如果使用了 {{Cssxref("-webkit-mask-image")}}, <code>-webkit-mask-attachment</code> 将指定蒙版在视口的位置是固定的,还是同包含块一起滚动的。</p>
+
+<pre class="brush: css no-line-numbers">/* 关键字 */
+-webkit-mask-attachment: scroll;
+-webkit-mask-attachment: fixed;
+-webkit-mask-attachment: local;
+
+/* 多个值 */
+-webkit-mask-attachment: scroll, local;
+-webkit-mask-attachment: fixed, local, scroll;
+
+/* 全局值 */
+-webkit-mask-attachment: inherit;
+-webkit-mask-attachment: initial;
+-webkit-mask-attachment: unset;
+</pre>
+
+<p>{{cssinfo}}</p>
+
+<h2 id="语法">语法</h2>
+
+<h3 id="可用的值">可用的值</h3>
+
+<dl>
+ <dt>scroll</dt>
+ <dd>使用 <code>scroll</code> 时, 蒙版在视口中同包含它的块一起滚动。</dd>
+ <dt>fixed</dt>
+ <dd><font face="Open Sans, arial, x-locale-body, sans-serif"><span style="background-color: #ffffff;">使用 </span></font><code>fixed</code> 时, 蒙版不会同包含它的元素一起滚动,而是在视口中固定不动。</dd>
+</dl>
+
+<h3 id="使用语法">使用语法</h3>
+
+<pre class="syntaxbox">{{csssyntax}}</pre>
+
+<h2 id="示例">示例</h2>
+
+<pre class="brush: css">body {
+ -webkit-mask-image: url('images/mask.png');
+ -webkit-mask-attachment: fixed;
+}
+</pre>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}<br>
+ {{CompatNo}} 24.0</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>4.0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>2.1</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>3.2</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="另见">另见</h2>
+
+<p>{{cssxref("-webkit-mask")}}, {{cssxref("-webkit-mask-clip")}}, {{cssxref("-webkit-mask-box-image")}}, {{cssxref("-webkit-mask-origin")}}, {{cssxref("-webkit-mask-image")}}, {{cssxref("-webkit-mask-composite")}}, {{cssxref("-webkit-mask-repeat")}}</p>