{"id":2679,"date":"2012-10-08T21:30:25","date_gmt":"2012-10-08T13:30:25","guid":{"rendered":"http:\/\/www.zhangxinxu.com\/wordpress\/?p=2679"},"modified":"2024-06-10T22:11:13","modified_gmt":"2024-06-10T14:11:13","slug":"html5-full-screen-api-firefox-chrome-difference","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2012\/10\/html5-full-screen-api-firefox-chrome-difference\/","title":{"rendered":"HTML5\u5168\u5c4fAPI\u5728FireFox\/Chrome\u4e2d\u7684\u663e\u793a\u5dee\u5f02"},"content":{"rendered":"<p>by <a href=\"http:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"http:\/\/www.zhangxinxu.com\/\">http:\/\/www.zhangxinxu.com<\/a><br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=2679\">http:\/\/www.zhangxinxu.com\/wordpress\/?p=2679<\/a><\/p>\n<h3>\u4e00\u3001\u4eba\u4eba\u7f51\u4e0a\u2026\u2026<\/h3>\n<p>\u4eca\u5929\uff0c\u5728\u4eba\u4eba\u7f51\u4e0a\u770b\u540c\u5b66\u6652\u5f97\u7167\u7247\u7684\u65f6\u5019\uff0c\u53d1\u73b0\u4e86\u8fd9\u4e2a\u6309\u94ae\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\u4eba\u4eba\u7f51\u4e0a\u65b0\u51fa\u73b0\u7684\u56fe\u7247\u5904\u7406\u56fe\u6807 \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201210\/2012-10-08_194122.png\" title=\"\u4eba\u4eba\u7f51\u4e0a\u65b0\u51fa\u73b0\u7684\u56fe\u7247\u5904\u7406\u56fe\u6807\" class=\"alignnone\" width=\"326\" height=\"156\" \/><\/p>\n<p>\u8fd9\u4e2a\u6309\u94ae\u662f\uff1f\u6211\u79fb\u4e86\u597d\u51e0\u904d\uff0c\u6ca1\u6709<code>title<\/code>\u63d0\u793a\u3002\u56fe\u5f62\u4e5f\u4e0d\u5177\u6709\u4ee3\u8868\u6027\uff0c\u4e00\u4e2a\u5708\u5708\u610f\u601d\u662f\uff1f\u2014\u2014\u5708\u4eba\uff1f\uff1f\u662f\u4e0d\u662f\u554a\uff1f\uff1f\u4e0d\u6562\u70b9\uff0c\u70b9\u4e86\u4e0d\u77e5\u9053\u4f1a\u53d1\u751f\u4ec0\u4e48\uff0c\u6d4f\u89c8\u5668\u4f1a\u4e0d\u4f1a\u5173\u6389\uff01\uff01\u6211\u601d\u60f3\u6597\u4e89\u505a\u4e86\u5f88\u4e45\uff0c\u7ec8\u4e8e\u5f31\u5f31\u5730\u70b9\u4e86\u4e00\u4e0b~~<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/emtion\/sweat.png\" width=\"150\" height=\"150\" \/><\/p>\n<p>\u8349\u9a86\u9a7c\uff0c\u5c45\u7136\u662f\u2014\u2014\u5168\u5c4f\u663e\u793a\u7684\u63d0\u793a\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\u5168\u5c4f\u663e\u793a\u7684\u63d0\u793a \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201210\/2012-10-08_195501.png\" title=\"\u5168\u5c4f\u663e\u793a\u7684\u63d0\u793a\" class=\"alignnone\" width=\"575\" height=\"413\" \/><\/p>\n<p>\u4eba\u4eba\u5144\uff0c\u4f7f\u7528\u65b0\u6280\u672f\u56fa\u7136\u503c\u5f97\u63d0\u5021\uff0c\u8fd9\u4e2a\u5708\u5708\u4e5f\u4e0d\u52a0\u4e2a\u63d0\u793a\u2014\u2014\u8ba9\u4eba\u77e5\u9053\u70b9\u4e86\u4e4b\u540e\u662f\u5168\u5c4f\u554a\uff01\uff01\u5426\u5219\uff0c\u4ffa\u4eec\u8106\u5f31\u7684\u5c0f\u5fc3\u810f\u6839\u672c\u627f\u53d7\u4e0d\u8d77\u554a\u2014\u2014\u5c4f\u5e55\u7acb\u9a6c\u9ed1\u4e86\u4e2a\u901a\u900f\u2014\u2014\u8fd8\u4ee5\u4e3a\u76d6\u8328\u53d1\u73b0\u6211\u7684\u7cfb\u7edf\u662f\u76d7\u7248\u7684\u9ed1\u4e86\u6211\u7684\u5c4f\u5462\uff01\uff01\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/emtion\/surprise.png\" width=\"150\" height=\"150\" \/><\/p>\n<p>\u597d\u5427\uff0c\u73a9\u5b8c\u4e24\u628a\u4e09\u56fd\u6740\uff0c\u60c5\u7eea\u7a33\u5b9a\u4e86\uff0c\u56de\u5230\u6b63\u9898\u3002\u4eba\u4eba\u7f51\u8fd9\u4e2a\u5168\u5c4f\u6548\u679c\u5c31\u662f\u4f7f\u7528\u7684HTML5\u7684\u5168\u5c4fAPI\uff0c\u4f7f\u7528\u5176\u5b9e\u5f88easy\u7684\uff01\u5bf9\u4e8e\u5168\u5c4fAPI\uff0c\u5e74\u521d\u7684\u65f6\u5019\u5c31\u6709\u8033\u95fb\uff0c\u4f46\u672a\u505a\u6d4b\u8bd5\u4e0e\u4e86\u89e3\uff0c\u73b0\u5728\uff0c\u4eba\u4eba\u541b\u5df2\u7ecf\u7528\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u4e86\uff0c\u663e\u7136\uff0c\u6709\u5fc5\u8981\u4e86\u89e3\u4e00\u756a\uff0c\u53ef\u4ee5\u5728\u81ea\u5df1\u7684\u9879\u76ee\u4e2d\u800d\u800d\u9177\uff0c\u8fc7\u8fc7HTML5\u7684\u763e\u3002<\/p>\n<h3>\u4e8c\u3001\u76f8\u5173\u6587\u7ae0\u4ee5\u53ca\u4e00\u4e9b\u6280\u672f\u70b9<\/h3>\n<p>\u641c\u4e86\u4e0b\uff0c\u4ecb\u7ecd\u7684\u6587\u7ae0\u8fd8\u4e0d\u5c11\uff0c\u60a8\u53ef\u4ee5\u53c2\u8003\uff1a<\/p>\n<ul id=\"ul\">\n<li>\u6b66\u65b9\u535a\u539f\u521b\u7684html5\u5b9e\u73b0\u5168\u5c4f\u7684api\u65b9\u6cd5\uff08\u539f\u5730\u5740\uff1ahttp:\/\/www.wufangbo.com\/html5-quanping\/\uff0c\u73b0\u5df2\u5931\u6548\uff09\u4e00\u6587\u3002\u6587\u7ae0\u524d\u9762\u5c5e\u4e8e\u5907\u5fd8\u6027\u8d28\u7684\u5185\u5bb9\uff0c\u6ca1\u770b\u5934\uff1b\u4e0d\u8fc7\uff0c\u6700\u540e\u7684\u5fc3\u5f97\u5f88\u4e0d\u9519\uff0c\u5b9e\u9645\u5e94\u7528\u7ecf\u9a8c\uff0c\u503c\u5f97\u4e00\u770b\u3002<\/li>\n<li>heero\u7ffb\u8bd1\u7684\u201c[\u8bd1]\u539f\u751f\u5168\u5c4fJavascript API\uff08\u539f\u5730\u5740\uff1ahttp:\/\/heeroluo.net\/Article\/Detail\/97\uff0c\u73b0\u5df2\u5931\u6548\uff09\u201d\u3002\u53bb\u5e74\u65f6\u5019\u5185\u5bb9\uff0c\u7a0d\u5faeold\u7684\u70b9\uff0c\u591a\u7406\u8bba\uff0c\u6709\u503c\u5f97\u6ce8\u610f\u7684\u77e5\u8bc6\u70b9\uff0c\u80fd\u4e86\u89e3API\u7684\u5927\u6982\u3002<\/li>\n<li>sitePoint\u4e0a\u7684&#8221;<a href=\"http:\/\/www.sitepoint.com\/html5-full-screen-api\/\">How to Use the HTML5 Full-Screen API<\/a>&#8220;, \u8f83\u65b0\u7684\u6587\u7ae0\u5417\uff0c\u8ddf\u5b9e\u9645\u5e94\u7528\u8d70\u7684\u4e5f\u5f88\u8fd1\uff0c\u6709demo\uff0c\u66f4\u503c\u5f97\u53c2\u8003\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u60a8\u6b63\u597d\u5904\u4e8e\u8282\u540e\u7efc\u5408\u75c7\u53d1\u75c5\u671f\uff0c\u61d2\u5f97\u70b9\u51fb\u4e0a\u9762\u94fe\u63a5\uff0c\u4e5f\u53ef\u4ee5\u770b\u4e0b\u9762\u6211\u7cbe\u7b80\u51fa\u6765\u7684\u4e00\u4e9b\u5b9e\u7528\u7684\u4e1c\u897f\uff1a<\/p>\n<ol>\n<li>\u5168\u5c4f\u6548\u679cJavaScript\u5b9e\u73b0<\/li>\n<li>\u5168\u5c4f\u6548\u679c<code>click<\/code>, <code>mousedwon<\/code>, <code>mouseup<\/code>\u4e8b\u4ef6\u624d\u80fd\u89e6\u53d1<\/li>\n<li>\u5168\u5c4f\u65b9\u6cd5\u4e3a\uff1a<code>\u5168\u5c4f\u5143\u7d20.requestFullScreen()<\/code>; \u76ee\u524d\u4e0d\u540c\u7684\u6d4f\u89c8\u5668\u9700\u8981\u4e0d\u540c\u7684\u524d\u7f00\uff0c\u5982<code>mozRequestFullScreen<\/code>\u6216<code>webkitRequestFullScreen<\/code><\/li>\n<li>\u53d6\u6d88\u5168\u5c4f\u4e3a\uff1a<code>\u5168\u5c4f\u5143\u7d20.cancelFullScreen()<\/code>; \u540c\u6837\uff0c\u4e0d\u540c\u6d4f\u89c8\u5668\u9700\u8981\u6dfb\u52a0\u79c1\u6709\u524d\u7f00\uff0c\u5982<code>mozCancelFullScreen<\/code>\u6216<code>webkitCancelFullScreen<\/code>.<\/li>\n<li>\u53ef\u4ee5\u901a\u8fc7<code>document.fullScreen<\/code>\u5224\u65ad\u6d4f\u89c8\u5668\u662f\u5426\u5904\u4e8e\u5168\u5c4f\u72b6\u6001\u3002\u6ce8\u610f\uff1aFireFox\u548cChrome\u5199\u6cd5\u4e0a\u6709\u4e0d\u540c\uff0cWebkit\u5185\u6838\u6d4f\u89c8\u5668\u9700\u8981\u589e\u52a0\u4e2a<code>is<\/code>, \u5982<code>document.webkitIsFullScreen<\/code>; \u800cFirefox\u5219\u662f<code>document.mozFullScreen<\/code>.<\/li>\n<li><code>:full-screen{}<\/code>\u7528\u5728CSS\u4ee3\u7801\u4e2d\uff0c\u53ef\u4ee5\u63a7\u5236\u5168\u5c4f\u5143\u7d20\uff08\u53ca\u5176\u5b50\u5143\u7d20\uff09\u5168\u5c4f\u72b6\u6001\u65f6\u7684\u6837\u5f0f\u3002\u540c\u6837\uff0c\u4e0d\u540c\u6d4f\u89c8\u5668\u4e0d\u540c\u524d\u7f00\u3002\u5982<code>:-moz-full-screen{}<\/code>\u6216<code>:- webkit-full-screen{}<\/code>\u3002\n<p><strong>\u66f4\u65b0\u4e8e2019-05-05<\/strong><\/p>\n<p>\u73b0\u5728\u8be5\u4f2a\u7c7b\u5df2\u7ecf\u53d8\u6210<code>:fullscreen<\/code>\uff0c\u6ca1\u6709\u77ed\u6a2a\u7ebf\uff0c\u4e5f\u65e0\u9700\u79c1\u6709\u524d\u7f00\u3002\u5982\u679c\u60f3\u8981\u8bbe\u7f6e\u9ed8\u8ba4\u9ed1\u8272\u80cc\u666f\u5c42\u7684\u6837\u5f0f\uff0c\u53ef\u4ee5\u4f7f\u7528\u4f2a\u5143\u7d20<code>::backdrop<\/code>\u3002<\/li>\n<li>\u4e00\u4e2a\u9875\u9762\u5982\u679c\u6709\u591a\u4e2a\u5168\u5c4f\u5143\u7d20\uff0c\u5728CSS\u63a7\u5236\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u4f7f\u7528\u7c7b\u4f3c<code>#element:full-screen{}<\/code>\u7684\u9009\u62e9\u5668\u5206\u522b\u63a7\u5236\u3002<\/li>\n<\/ol>\n<p>\u5982\u679c\u4ee5\u4e0a\u5bc6\u5bc6\u9ebb\u9ebb\u7684\u6587\u5b57\u770b\u5f97\u4f60\u5934\u5927\u773c\u82b1\uff0c\u6362\u4e2a\u8f7b\u677e\u7684\u6d4f\u89c8\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a class=\"a_link\" target=\"_blank\" href=\"http:\/\/www.zhangxinxu.com\/study\/201210\/html5-full-screen-api.html\" rel=\"noopener\">HTML5 full-screen\u5168\u5c4fAPI\u6d4b\u8bd5demo<\/a><\/p>\n<p>\u70b9\u51fbdemo\u9875\u9762\u4e2d\u7684\u7f8e\u5973\u7167\u7247\uff0c\u5373\u53ef\u89e6\u53d1\u5168\u5c4f\u6d4f\u89c8\u63d0\u793a\u3002<\/p>\n<p>\u8be5demo\u51e0\u4e4e\u5747\u9075\u5faa\u4e86\u4e0a\u9762\u6982\u8981\u7684\u4e00\u4e9b\u6280\u672ftips, \u5b8c\u6574\u4ee3\u7801demo\u9875\u9762\u4e0a\u5747\u6709\uff0c\u4e0d\u96be\u61c2\u7684\uff0c\u5927\u5bb6\u6709\u5174\u8da3\u53ef\u4ee5\u770b\u770b\u3002<\/p>\n<p>\u5982\u679c\u60a8\u60f3\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u4f7f\u7528HTML5\u5168\u5c4fAPI\uff0cdemo\u9875\u9762\u4e2d\u51fa\u73b0\u7684\u8fd9\u4e2a\u65b9\u6cd5\u5fc5\u4e0d\u53ef\u5c11\uff08\u53ef\u4ee5\u517c\u5bb9\u4ee5\u540eN\u591a\u5e74\u7684HTML5\u53d1\u5c55\uff09\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>var runPrefixMethod = function(element, method) {\r\n    var usablePrefixMethod;\r\n    [\"webkit\", \"moz\", \"ms\", \"o\", \"\"].forEach(function(prefix) {\r\n        if (usablePrefixMethod) return;\r\n        if (prefix === \"\") {\r\n            <span style=\"color:green;\">\/\/ \u65e0\u524d\u7f00\uff0c\u65b9\u6cd5\u9996\u5b57\u6bcd\u5c0f\u5199<\/span>\r\n            method = method.slice(0,1).toLowerCase() + method.slice(1);\r\n        }\r\n        \r\n        var typePrefixMethod = typeof element[prefix + method];\r\n        if (typePrefixMethod + \"\" !== \"undefined\") {\r\n            if (typePrefixMethod === \"function\") {\r\n                usablePrefixMethod = element[prefix + method]();\r\n            } else {\r\n                usablePrefixMethod = element[prefix + method];\r\n            }\r\n        }\r\n    });\r\n    \r\n    return usablePrefixMethod;\r\n};\r\n<\/pre>\n<\/div>\n<p>\u65e2\u662f\u65b9\u6cd5\u6267\u884c\uff08\u5982\u679c\u662f\u65b9\u6cd5\uff09\uff0c\u53c8\u662f\u5c5e\u6027\u5224\u65ad\uff08\u662f\u5426\u652f\u6301\u5c5e\u6027\uff09\uff0c\u5f88\u5b9e\u7528\uff0c\u53ef\u4ee5\u76f4\u63a5\u62f7\u8d1d\u7c98\u8d34\u4f7f\u7528\u3002<\/p>\n<p>OK\uff0c\u8fd9\u91cc\u6240\u8bf4\u7684\u4e1c\u897f\uff0c\u5176\u5b9e\u4e0a\u9762\u51e0\u7bc7\u53c2\u8003\u6587\u7ae0\u90fd\u6709\u8bf4\u8fc7\uff0c\u6ca1\u610f\u601d\uff01\u73b0\u5728\u76ee\u5149\u8f6c\u79fb\u5230\u4e0b\u9762\uff0c\u547c\u5438\u4e00\u4e9b\u65b0\u9c9c\u7684\u7a7a\u6c14~~<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/emtion\/smile.png\" width=\"150\" height=\"150\" \/><\/p>\n<h3>\u4e09\u3001FireFox\/Chrome\u4e2d\u7684\u663e\u793a\u5dee\u5f02<\/h3>\n<p><strong>\u8868\u8c61\u7684\u5dee\u5f02\uff1a<\/strong><br \/>\n\u8868\u8c61\u7684\u5dee\u5f02\u5c31\u662f\u662f\u5426\u652f\u6301\u5168\u5c4f\u63d0\u793a\u7684\u5dee\u5f02\u4e86\uff0cFireFox\u6d4f\u89c8\u5668\u4ee5\u524d\u662f\u4e2a\u5927\u6846\u6846\uff0c\u73b0\u5728UI\u548c\u5219\u7b80\u7ea6\u7684\u591a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201801\/2018-01-02_020902.png\" width=\"664\" height=\"239\" alt=\"Firefox\u4e0b\u5168\u5c4f\u6548\u679c\" class=\"alignnone\" \/><\/p>\n<p>\u800cChrome\u6d4f\u89c8\u5668\u4e0b\u662f\u4e2a\u5b9e\u8272\u80cc\u666f\uff08\u53c2\u89c1\u4e0b\u622a\u56fe\uff09\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201801\/2018-01-02_020657.png\" width=\"606\" height=\"402\" alt=\"Chrome\u6d4f\u89c8\u5668\u4e0b\u662f\u5426\u5141\u8bb8\u5168\u5c4f\u7684\u63d0\u793a\" class=\"alignnone\" \/><\/p>\n<p>\u6d4f\u89c8\u5668\u751f\u4ea7\u5546\u7684\u559c\u597d\uff0c\u6ca1\u4ec0\u4e48\u597d\u8bf4\u7684\u3002<\/p>\n<p><strong>\u66f4\u7ec6\u81f4\u7684\u5dee\u5f02\uff1a<\/strong><br \/>\n\u5982\u679c\u60a8\u89c2\u5bdf\u591f\u4ed4\u7ec6\uff0c\u60a8\u53ef\u80fd\u4f1a\u53d1\u73b0\uff0c\u5728\u5168\u5c4f\u72b6\u6001\u4e0b\uff0cFireFox\u6d4f\u89c8\u5668\u4e0b\u70b9\u51fb\u754c\u9762\u7684\u4efb\u610f\u4f4d\u7f6e\uff0c\u90fd\u4f1a\u56de\u5230\u6b63\u5e38\u72b6\u6001\uff1b\u4f46\u662fChrome\u6d4f\u89c8\u5668\u4e0b\uff0c\u53ea\u6709\u70b9\u51fb\u56fe\u7247\u624d\u80fd\u56de\u5230\u6b63\u5e38\u72b6\u6001\u3002\u4e0b\u9762\u4e24\u5f20\u56fe\u662f\u540c\u4e00\u4f4d\u7f6e\uff0c\u9f20\u6807\u624b\u5f62\u7684\u5dee\u5f02\u5bf9\u6bd4\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"FireFox\u6d4f\u89c8\u5668\u4e0b\u56fe\u7247\u5916\u90e8\u7684\u9f20\u6807\u624b\u5f62 \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201210\/2012-10-08_205529.png\" title=\"FireFox\u6d4f\u89c8\u5668\u4e0b\u56fe\u7247\u5916\u90e8\u7684\u9f20\u6807\u624b\u5f62\" class=\"alignnone\" width=\"242\" height=\"163\" \/> <img loading=\"lazy\" decoding=\"async\" alt=\"Chrome\u6d4f\u89c8\u5668\u56fe\u7247\u5916\u90e8\u7684\u9f20\u6807\u624b\u5f62\u622a\u56fe \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201210\/2012-10-08_205636.png\" title=\"Chrome\u6d4f\u89c8\u5668\u56fe\u7247\u5916\u90e8\u7684\u9f20\u6807\u624b\u5f62\u622a\u56fe\" class=\"alignnone\" width=\"232\" height=\"132\" \/><\/p>\n<p><strong>\u6df1\u5c42\u6b21\u7684\u539f\u56e0\uff1a<\/strong><br \/>\n\u867d\u7136\uff0cdemo\u9875\u9762\u4e2d\uff0c\u80cc\u666f\u90fd\u662f\u5168\u5c4f\u7684\u9ed1\u8272\uff0c\u56fe\u7247\u6548\u679c\u4e00\u6837\uff0c\u9ad8\u5ea660%\u653e\u5927\u663e\u793a\uff0c\u5782\u76f4\u4e14\u6c34\u5e73\u5c45\u4e2d\uff0c\u4f46\u662f\uff0c\u5176\u80cc\u540e\u5b9e\u73b0\u7684\u673a\u5236\u5374\u662f\u5f88\u4e0d\u4e00\u6837\u7684\u3002<\/p>\n<p>FireFox\u6d4f\u89c8\u5668\u5bf9\u5168\u5c4f\u5143\u7d20\u8fdb\u884c\u7684\u4e00\u4e9bCSS\u5c5e\u6027\u7684\u5f3a\u8bbe\u7f6e\uff0c\u6253\u5f00FireBug\uff0c\u67e5\u770b\u7cfb\u7edf\u9ed8\u8ba4\u6837\u5f0f\uff0c\u60a8\u4f1a\u770b\u5230\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"FireFox\u6d4f\u89c8\u5668\u4e2d\u9ed8\u8ba4\u5bf9\u5168\u5c4f\u5143\u7d20\u7684CSS\u8bbe\u7f6e \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201210\/2012-10-08_210718.png\" title=\"FireFox\u6d4f\u89c8\u5668\u4e2d\u9ed8\u8ba4\u5bf9\u5168\u5c4f\u5143\u7d20\u7684CSS\u8bbe\u7f6e\" class=\"alignnone\" width=\"554\" height=\"267\" \/><\/p>\n<p>\u4e5f\u5c31\u662f\uff0c\u5143\u7d20\u5bbd\u9ad8100%\u663e\u793a\uff0c\u9ed1\u8272\u80cc\u666f\uff0c\u56fa\u5b9a\u5b9a\u4f4d\u2014\u2014\u8fd9\u4e5f\u662f\u4e3a\u4ec0\u4e48FireFox\u6d4f\u89c8\u5668\u4e0b\u70b9\u51fb\u5c4f\u5e55\u4efb\u610f\u4f4d\u7f6e\u4f1a\u9000\u51fa\u5168\u5c4f\u2014\u2014\u56e0\u4e3a\u7ed1\u5b9a\u4e86\u4e8b\u4ef6\u7684\u5168\u5c4f\u5143\u7d20\u6ee1\u5c4f\u663e\u793a\u4e86\u3002<\/p>\n<p>\u80cc\u666f\u8272\u975e\u5f3a\u8bbe\u7f6e\uff0c\u901a\u8fc7\u5982\u4e0bCSS\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u8fdb\u884c\u4fee\u6539\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>:-moz-full-screen {\r\n    background-color: #fff;\r\n}<\/pre>\n<\/div>\n<p>\u7ed3\u679c\uff0c\u5c31\u662f\u4e0b\u56fe\u8fd9\u4e2a\u6837\u5b50\uff0c\u9ed1\u8272\u80cc\u666f\u53d8\u6210\u767d\u8272\u80cc\u666f\u4e86\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/201801\/2018-01-02_021218.png\" width=\"622\" height=\"175\" alt=\"FireFox\u6d4f\u89c8\u5668\u4e0b\u5168\u5c4f\u80cc\u666f\u767d\u8272\u7684\u663e\u793a\" class=\"alignnone\" \/><\/p>\n<p>\u800cChrome\u6d4f\u89c8\u5668\u4e0b\uff0c\u867d\u7136\u9ed8\u8ba4\u5bf9\u5168\u5c4f\u5143\u7d20\u4e5f\u6709CSS\u8bbe\u7f6e\uff0c\u4f46\u662f\u5be5\u5be5\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"Chrome\u6d4f\u89c8\u5668\u4e0b\u5168\u5c4f\u5143\u7d20\u7684\u9ed8\u8ba4CSS\u8bbe\u7f6e \u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201210\/2012-10-08_211425.png\" title=\"Chrome\u6d4f\u89c8\u5668\u4e0b\u5168\u5c4f\u5143\u7d20\u7684\u9ed8\u8ba4CSS\u8bbe\u7f6e\" class=\"alignnone\" width=\"320\" height=\"89\" \/><\/p>\n<p>\u597d\u5427\uff0c\u57fa\u672c\u4e0a\u5c31\u662f\u4e24\u4e2a\u9171\u6cb9CSS\u8bbe\u7f6e\uff0c\u80cc\u666f\u8272\u8fd8\u662f\u767d\u8272\u7684\u3002<\/p>\n<p>\u73b0\u5728\u95ee\u9898\u6765\u4e86\uff1f\u4e3a\u4f55\u4e24\u4e2a\u6d4f\u89c8\u5668\u9ed8\u8ba4\u7684\u5168\u5c4fCSS\u6837\u5f0f\u4e0d\u4e00\u6837\uff0c\u4f46\u662f\uff0c\u90fd\u662f\u9ed1\u8272\u80cc\u666f\uff0c\u56fe\u7247\u5782\u76f4\u6c34\u5e73\u5c45\u4e2d\u5462\uff01\uff01\uff01<\/p>\n<p><strong>\u89e3\u91ca\uff1a<\/strong>FireFox\u6d4f\u89c8\u5668\u4e0b\u7684\u9ed1\u8272\u80cc\u666f\u5c31\u662f\u5168\u5c4f\u5143\u7d20\uff0c\u5176\u4e2d\u56fe\u7247\u7684\u5c45\u4e2d\u5bf9\u9f50\u662f\u901a\u8fc7CSS\u63a7\u5236\u7684\uff08:after\u4f2a\u7c7b\u751f\u6210\u5143\u7d20+vertical-align:middle\u5b9e\u73b0\uff09\uff0c\u4f8b\u5982\u53bb\u6389<code>text-align:center<\/code>\u56fe\u7247\u5c31\u4e0d\u6c34\u5e73\u5c45\u4e2d\u4e86\uff1b\u800cChrome\u7684\u9ed1\u8272\u80cc\u666f\u5c5e\u4e8e\u7cfb\u7edf\u7684\u4e1c\u897f\uff0c\u5176\u5168\u5c4f\u5143\u7d20\u4f3c\u4e4e\u88ab\u6d4f\u89c8\u5668\u52ab\u6301\uff0c\u9ed8\u8ba4\u72b6\u51b5\u4e0b\u6c38\u8fdc\u5c4f\u5e55\u5c45\u4e2d\u663e\u793a\uff08\u53bb\u6389<code>text-align:center<\/code>\u56fe\u7247\u4f9d\u7136\u6c34\u5e73\u5c45\u4e2d\uff09\u2014\u2014\u8131\u79bb\u4e86\u5e38\u89c4CSS\u7406\u89e3\u2014\u2014\u5982\u9ed8\u8ba4\u7684<code>display:block<\/code>\u72b6\u6001\u4f3c\u4e4e\u53d8\u6210\u4e86<code>display:inline-block<\/code>\u7b49\u3002<\/p>\n<p>\u7136\u800c\uff0c\u6211\u4eec\u662f\u6709\u529e\u6cd5\u8ba9Chrome\u8868\u73b0\u5f97\u8ddfFireFox\u6d4f\u89c8\u5668\u4e00\u6837\u5730\uff0c\u5c31\u662f\u589e\u52a0\u4e00\u6837FireFox\u6d4f\u89c8\u5668\u9ed8\u8ba4\u6709\u7684\u6837\u5f0f\uff0c\u5982\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>:-webkit-full-screen {\r\n    background-color: black;\r\n    position: fixed;\r\n    top: 0;\r\n    right: 0;\r\n    left: 0;\r\n    bottom: 0;\t\r\n}<\/pre>\n<\/div>\n<p>\u4e8e\u662f\uff0c\u8fd9\u6837\u5b50\uff0c\u5373\u4f7f\u5728Chrome\u6d4f\u89c8\u5668\u4e0b\uff0c\u70b9\u51fb\u5c4f\u5e55\u7684\u4efb\u610f\u4f4d\u7f6e\uff0c\u5168\u5c4f\u72b6\u6001\u90fd\u4f1a\u9000\u51fa\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/emtion\/cute.png\" width=\"150\" height=\"150\" \/><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u8f6c\u8f7d\u8bf7\u6ce8\u660e\u6765\u81ea<a href=\"http:\/\/www.zhangxinxu.com\/\">\u5f20\u946b\u65ed-\u946b\u7a7a\u95f4-\u946b\u751f\u6d3b<\/a>[<a href=\"http:\/\/www.zhangxinxu.com\/\">http:\/\/www.zhangxinxu.com<\/a>]<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=2679\">http:\/\/www.zhangxinxu.com\/wordpress\/?p=2679<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>FireFox\u6d4f\u89c8\u5668\u4e0b\u7684\u9ed1\u8272\u80cc\u666f\u5c31\u662f\u5168\u5c4f\u5143\u7d20\uff0c\u5176\u4e2d\u56fe\u7247\u7684\u5c45\u4e2d\u5bf9\u9f50\u662f\u901a\u8fc7CSS\u63a7\u5236\u7684\uff08:after\u4f2a\u7c7b\u751f\u6210\u5143\u7d20+vertical-align:middle\u5b9e\u73b0\uff09\uff0c\u4f8b\u5982\u53bb\u6389text-align:center\u56fe\u7247\u5c31\u4e0d\u6c34\u5e73\u5c45\u4e2d\u4e86\uff1b\u800cChrome\u7684\u9ed1\u8272\u80cc\u666f\u5c5e\u4e8e\u7cfb\u7edf\u7684\u4e1c\u897f\uff0c\u5176\u5168\u5c4f\u5143\u7d20\u4f3c\u4e4e\u88ab\u6d4f\u89c8\u5668\u52ab\u6301\uff0c\u9ed8\u8ba4\u72b6\u51b5\u4e0b\u6c38\u8fdc\u5c4f\u5e55\u5c45\u4e2d\u663e\u793a\uff08\u53bb\u6389text-align:center\u56fe\u7247\u4f9d\u7136\u6c34\u5e73\u5c45\u4e2d\uff09\u2014\u2014\u8131\u79bb\u4e86\u5e38\u89c4CSS\u7406\u89e3\u2014\u2014\u5982\u9ed8\u8ba4\u7684display:block\u72b6\u6001\u4f3c\u4e4e\u53d8\u6210\u4e86display:inline-block\u7b49\u2026\u2026<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1284],"tags":[215,136,135,52,13,523,41],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/2679"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=2679"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/2679\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=2679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=2679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=2679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}