aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/-webkit-touch-callout
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-touch-callout
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-touch-callout')
-rw-r--r--files/zh-cn/web/css/-webkit-touch-callout/index.html92
1 files changed, 92 insertions, 0 deletions
diff --git a/files/zh-cn/web/css/-webkit-touch-callout/index.html b/files/zh-cn/web/css/-webkit-touch-callout/index.html
new file mode 100644
index 0000000000..0f0d3a2182
--- /dev/null
+++ b/files/zh-cn/web/css/-webkit-touch-callout/index.html
@@ -0,0 +1,92 @@
+---
+title: '-webkit-touch-callout'
+slug: Web/CSS/-webkit-touch-callout
+translation_of: Web/CSS/-webkit-touch-callout
+---
+<p>{{CSSRef}} {{Non-standard_header}}</p>
+
+<h2 id="概述">概述</h2>
+
+<p><code>-webkit-touch-callout</code> 这个<a href="/en-US/docs/Web/CSS">CSS</a> 属性禁用了默认的callout展示, callout是指当触摸并按住一个元素的时候出现的提示。<br>
+ <br>
+ 当在iOS上一直按住一个目标元素时,Safari会展示一个关于这个链接的callout信息。<code>webkit-touch-callout</code>属性允许禁用掉这一行为。</p>
+
+<h2 id="Syntax" name="Syntax">语法</h2>
+
+<pre class="twopartsyntaxbox"><a href="/en-US/docs/Web/CSS/CSS_values_syntax">Formal syntax</a>: default | none
+</pre>
+
+<pre><code class="language-html">-webkit-touch-callout: default</code> /* displays the callout */
+<code class="language-html">-webkit-touch-callout: none</code> /* disables the callout */
+
+<code class="language-html">-webkit-touch-callout</code>: initial
+-webkit-touch-callout: inherit
+-webkit-touch-callout: unset</pre>
+
+<h3 id="可能的值">可能的值</h3>
+
+<dl>
+ <dt><code>default</code></dt>
+ <dd>此值表示显示默认的callout</dd>
+ <dt><code>none</code></dt>
+ <dd>此值表示禁用callout</dd>
+</dl>
+
+<h2 id="示例">示例</h2>
+
+<pre class="brush: css">.example {
+ -webkit-touch-callout: none;
+}
+</pre>
+
+<h2 id="Browser_Compatibility" name="Browser_Compatibility">浏览器兼容性</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 (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}<sup>[1]</sup></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>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatVersionUnknown}}<sup>[1]</sup></td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] <code>-webkit-touch-callout</code> 属性最早在<a href="https://developer.apple.com/library/safari/documentation/AppleApplications/Reference/SafariCSSRef/Articles/StandardCSSProperties.html#//apple_ref/css/property/-webkit-touch-callout"> iOS 2.0</a> 上实现,后来被添加到WebKit ({{webkitbug(121507)}}).</p>