aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/element/requestfullscreen/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/element/requestfullscreen/index.html')
-rw-r--r--files/zh-cn/web/api/element/requestfullscreen/index.html90
1 files changed, 1 insertions, 89 deletions
diff --git a/files/zh-cn/web/api/element/requestfullscreen/index.html b/files/zh-cn/web/api/element/requestfullscreen/index.html
index 045a760246..0958227790 100644
--- a/files/zh-cn/web/api/element/requestfullscreen/index.html
+++ b/files/zh-cn/web/api/element/requestfullscreen/index.html
@@ -74,95 +74,7 @@ translation_of: Web/API/Element/requestFullScreen
<h2 id="浏览器兼容性">浏览器兼容性</h2>
-<p>{{CompatibilityTable}}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Edge</th>
- <th>Firefox</th>
- <th>Internet Explorer</th>
- <th>Edge</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatVersionUnknown}}{{property_prefix("webkit")}}<sup>[1]</sup></td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoDesktop("9.0")}} as <code>mozRequestFullScreen</code><sup>[2]</sup><br>
- {{CompatGeckoDesktop("47.0")}} (behind full-screen-api.unprefix.enabled</td>
- <td>11{{property_prefix("ms")}}<sup>[3]</sup></td>
- <td>{{CompatVersionUnknown}}<sup>[3]</sup></td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Edge</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatVersionUnknown}}</td>
- <td>{{CompatGeckoMobile("9.0")}} as <code>mozRequestFullScreen</code><sup>[2]</sup><br>
- {{CompatGeckoMobile("47.0")}} (behind full-screen-api.unprefix.enabled</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p>[1] 同样以<code>webkitRequestFullScreen方法实现。</code></p>
-
-<p>[2] 使用带有浏览器前缀的<code>mozRequestFullScreen方法实现。在火狐44之前版本,Gecko浏览器内核错误地允许frame里面元素以及object元素进入全屏模式。而在之后的版本,这个漏洞被修复:仅允许位于顶部文档(top-level document)的元素,以及拥有</code>{{htmlattrxref("allowfullscreen", "iframe")}}属性的iframe的内部元素进入全屏显示。. </p>
-
-<p>[3] 使用IE时,最后的screen的s为小写,也即ms<code>RequestFullscreen,否则无效</code></p>
-
-<p>[4] 谷歌浏览器前缀webkitRequestFullScreen()里最后的Screen的S也可以为小写s,建议写成驼峰命名法</p>
-
-<p>[5]将浏览器前缀兼容封装成函数</p>
-
-<pre>function toFullVideo(){
-
- if(videoDom.requestFullscreen){
-
- return videoDom.requestFullscreen();
-
- }else if(videoDom.webkitRequestFullScreen){
-
- return videoDom.webkitRequestFullScreen();
-
- }else if(videoDom.mozRequestFullScreen){
-
- return videoDom.mozRequestFullScreen();
-
- }else{
-
- return videoDom.msRequestFullscreen();
-
- }
-
-}</pre>
-
-<p>[6] 详见 <a href="https://msdn.microsoft.com/en-us/library/dn254939%28v=vs.85%29.aspx">documentation on MSDN</a>.</p>
+{{Compat("api.Element.requestFullscreen")}}
<h2 id="参阅">参阅</h2>