{"id":9800,"date":"2021-02-11T23:42:58","date_gmt":"2021-02-11T15:42:58","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=9800"},"modified":"2021-02-11T23:42:58","modified_gmt":"2021-02-11T15:42:58","slug":"range-input","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2021\/02\/range-input\/","title":{"rendered":"\u5de7\u7528\u4e24\u4e2atype=range input\u5b9e\u73b0\u533a\u57df\u8303\u56f4\u9009\u62e9"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=9800\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=9800<\/a><br \/>\n\u672c\u6587\u6b22\u8fce\u5206\u4eab\u4e0e\u805a\u5408\uff0c\u5168\u6587\u8f6c\u8f7d\u5c31\u4e0d\u5fc5\u4e86\uff0c\u5c0a\u91cd\u7248\u6743\uff0c\u5708\u5b50\u5c31\u8fd9\u4e48\u5927\uff0c\u82e5\u6025\u7528\u53ef\u4ee5\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><script>window.wxShareImgUrl = 'https:\/\/www.zhangxinxu.com\/study\/image\/share\/202102-input-range.png';<\/script><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202102\/input-range-cover.png\" width=\"480\" height=\"309\" alt=\"\u5c01\u9762\u56fe\u5360\u4f4d\u56fe-\u533a\u57df\u8303\u56f4\u9009\u62e9\" class=\"alignright clip thumb size-medium\" \/><\/p>\n<h3>\u4e00\u3001\u81ea\u5b9a\u4e49\u6837\u5f0f\u7684range input<\/h3>\n<p><code>type=range<\/code>\u7c7b\u578b\u7684<code>&lt;input&gt;<\/code>\u8f93\u5165\u6846\u5728IE\u3001Chrome\u3001Safari\u3001Firefox\u6d4f\u89c8\u5668\u4e0b\u5747\u53ef\u4ee5\u5b9e\u73b0\u6837\u5f0f\u81ea\u5b9a\u4e49\u6548\u679c\u3002<\/p>\n<p>\u5177\u4f53\u53ef\u4ee5\u53c2\u8003\u621113\u5e74\u6574\u7406\u7684\u8fd9\u7bc7\u6587\u7ae0\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=3381\">\u4f2a\u5143\u7d20\u8868\u5355\u63a7\u4ef6\u9ed8\u8ba4\u6837\u5f0f\u91cd\u7f6e\u4e0e\u81ea\u5b9a\u4e49\u5927\u5168<\/a>\u201d\u3002<\/p>\n<p>\u9664\u4e86\u4f20\u7edf\u7684\u533a\u57df\u9009\u62e9\uff0crange\u7c7b\u578b\u7684\u8f93\u5165\u6846\u8fd8\u53ef\u4ee5\u5b9e\u73b0\u7c7b\u4f3c\u661f\u661f\u8bc4\u5206\u7684\u4ea4\u4e92\u6548\u679c\uff0c\u7eafCSS\uff0c\u4e14\u652f\u6301\u6ed1\u52a8\u9009\u62e9\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202102\/star.gif\" width=\"498\" height=\"114\" alt=\"\u8bc4\u5206\u529f\u80fd\u4ea4\u4e92\u622a\u56fe\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5177\u4f53\u53ef\u4ee5\u53c2\u8003\u9605\u6587\u524d\u7aef\u56e2\u961f<a href=\"https:\/\/github.com\/sunseekers\" rel=\"noopener\" target=\"_blank\">sunseekers<\/a>\u5199\u7684\u201c<a href=\"https:\/\/juejin.cn\/post\/6919452754716934152\" rel=\"noopener nofollow\" target=\"_blank\">\u9707\u60ca\uff0ctype=range\u5c45\u7136\u53ef\u4ee5\u5b9e\u73b0\u8bc4\u661f\u529f\u80fd<\/a>\u201d\u8fd9\u7bc7\u6587\u7ae0\u3002<\/p>\n<p>\u800c\u672c\u6587\u8981\u6f14\u793a\u7684\u6848\u4f8b\u548c\u4e0a\u9762\u90fd\u6709\u6240\u4e0d\u540c\uff0c\u662f\u8ba9\u4e24\u4e2atype=range\u9009\u62e9\u6846\u5408\u4e8c\u4e3a\u4e00\uff0c\u76f4\u63a5\u5728\u533a\u57df\u4e2d\u9009\u62e9\u67d0\u4e00\u4e2a\u8303\u56f4\uff0c\u800c\u4e0d\u662f\u9009\u62e9\u533a\u57df\u4e2d\u7684\u67d0\u4e2a\u503c\u3002<\/p>\n<p><span class=\"hidden\">\/\/zxx: \u5982\u679c\u4f60\u770b\u5230\u8fd9\u6bb5\u6587\u5b57\uff0c\u8bf4\u660e\u4f60\u73b0\u5728\u8bbf\u95ee\u662f\u4f53\u9a8c\u7cdf\u7cd5\u7684\u5783\u573e\u76d7\u7248\u7f51\u7ad9\uff0c\u4f60\u53ef\u4ee5\u8bbf\u95ee\u539f\u6587\u83b7\u5f97\u5f88\u597d\u7684\u4f53\u9a8c\uff1ahttps:\/\/www.zhangxinxu.com\/wordpress\/?p=9800\uff08\u4f5c\u8005\u5f20\u946b\u65ed\uff09<\/span><\/p>\n<h3>\u4e8c\u3001\u533a\u57df\u4e2d\u7684\u8303\u56f4\u9009\u62e9<\/h3>\n<p>\u76f4\u63a5\u5148\u770b\u5b9e\u73b0\u7684\u6548\u679cGIF\u5f55\u5c4f\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202102\/range-selected2.gif\" width=\"420\" height=\"78\" alt=\"\u533a\u57df\u8303\u56f4\u9009\u62e9\u5f55\u5c4f\u6548\u679c\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5c31\u662f\u76f4\u63a5\u9009\u62e9\u67d0\u4e00\u4e2a\u533a\u57df\u5185\u7684\u67d0\u4e00\u4e2a\u8303\u56f4\u3002<\/p>\n<p>\u6d4f\u89c8\u5668\u539f\u751f\u662f\u6ca1\u6709\u8fd9\u6837\u7684\u7ec4\u4ef6\u7684\uff0c\u53ea\u6709\u9009\u62e9\u5355\u4e2a\u503c\u3002<\/p>\n<p>\u5982\u679c\u591a\u503c\u9009\u62e9\uff0c\u5176\u5b9e\u6709\u4e2a\u5f88\u53d6\u5de7\u7684\u65b9\u6cd5\u3002<\/p>\n<p>\u90a3\u5c31\u662f\u62ff\u4e24\u4e2a<code>type=range<\/code>\u8f93\u5165\u6846\u53e0\u5728\u4e00\u8d77\uff0c\u7136\u540e\u53e0\u5728\u4e0a\u9762\u7684\u9009\u62e9\u6846\u7684\u53ea\u6709\u4e2d\u95f4\u7684\u62d6\u62fd\u6309\u94ae\uff0c\u80cc\u540e\u7684\u62d6\u62fd\u80cc\u666f\u6761\u76f4\u63a5\u9690\u85cf\uff0c\u8fd9\u6837\uff0c\u89c6\u89c9\u4e0a\u5c31\u662f\u4e00\u4e2a\u80cc\u666f\u6761\uff0c2\u4e2a\u62d6\u62fd\u6309\u94ae\u4e86\u3002<\/p>\n<p>HTML\u7ed3\u6784\u5927\u81f4\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;input type=\"range\" max=\"100\" min=\"0\"&gt;\r\n&lt;input type=\"range\" max=\"100\" min=\"0\"&gt;<\/pre>\n<p>\u9690\u85cf\u7b2c2\u4e2a\u9009\u62e9\u6846\u7684\u62d6\u62fd\u6761\u80cc\u666f\uff0c\u53ef\u4ee5\u8fd9\u6837\u8bbe\u7f6e\uff1a<\/p>\n<pre>[type=\"range\"] + [type=\"range\"]::-webkit-slider-runnable-track {\r\n    background: none;\r\n}\r\n[type=\"range\"] + [type=\"range\"]::-moz-range-track {\r\n    background: none;\r\n}<\/pre>\n<p>\u4ee5\u4e0a\u5c31\u662f\u533a\u57df\u8303\u56f4\u9009\u62e9\u5b9e\u73b0\u7684\u6838\u5fc3\u539f\u7406\u548c\u903b\u8f91\u3002<\/p>\n<p>\u5f53\u7136\uff0c\u7a76\u5176\u7ec6\u8282\u6837\u5f0f\uff0c\u8fd8\u6709\u4e00\u4e9b\u5de5\u4f5c\u8981\u5904\u7406\u3002<\/p>\n<h4>1. \u70b9\u51fb\u62d6\u62fd\u6761\u9009\u4e2d\u529f\u80fd\u8981\u7981\u6b62<\/h4>\n<p>\u5982\u679c\u662f\u5355\u503c\u9009\u62e9\uff0c\u70b9\u51fb\u62d6\u62fd\u6761\u975e\u6309\u94ae\u533a\u57df\u81ea\u52a8\u9009\u62e9\u662f\u6ca1\u6709\u4efb\u4f55\u95ee\u9898\u7684\uff0c\u5982\u4e0bGIF\u4ea4\u4e92\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202102\/range-click-select.gif\" width=\"263\" height=\"50\" alt=\"\u5355\u4e2a\u533a\u57df\u70b9\u51fb\u9009\u62e9\u4ea4\u4e92\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4f46\u662f\u5982\u679c\u662f\u591a\u503c\u9009\u62e9\uff0c\u70b9\u51fb\u62d6\u62fd\u533a\u57df\u7684\u5b9a\u4f4d\u5c31\u4f1a\u6709\u95ee\u9898\uff0c\u56e0\u4e3a\u67092\u4e2athumb\u6309\u94ae\uff0c\u7a76\u7adf\u8be5\u5b9a\u4f4d\u54ea\u4e00\u4e2a\u5462\uff1f<\/p>\n<p>\u5c31\u4f1a\u6709\u903b\u8f91\u95ee\u9898\uff0c\u56e0\u6b64\uff0c\u9700\u8981\u7981\u6b62\u6389\u3002<\/p>\n<p>\u7981\u6b62\u65b9\u6cd5\u76f4\u63a5CSS\u5c31\u53ef\u4ee5\u5b8c\u6210\uff0c\u4ee3\u7801\u793a\u610f\u5982\u4e0b\uff1a<\/p>\n<pre>[type=\"range\"] {\r\n    pointer-events: none;\r\n}\r\n[type=\"range\"]::-webkit-slider-thumb {\r\n    pointer-events: auto;\r\n}\r\n[type=\"range\"]::-moz-range-thumb {\r\n    pointer-events: auto;\r\n}<\/pre>\n<h4>2. \u9009\u4e2d\u8303\u56f4\u989c\u8272\u7684\u9ad8\u4eae<\/h4>\n<p>\u8fd9\u662f\u4e2a\u96be\u9898\uff0c\u5bf9\u4e8e\u5355\u503c\u9009\u62e9\uff0c\u5982\u679c\u662f\u65b9\u65b9\u6b63\u6b63\uff0cthumb\u6309\u94ae\u9ad8\u5ea6\u548c\u5916\u90e8\u6ed1\u5757\u8f68\u9053\u9ad8\u5ea6\u4e00\u81f4\uff0c\u5219\u7eafCSS\u662f\u53ef\u4ee5\u641e\u5b9a\u7684\u3002<\/p>\n<p>\u4f46\u662f\uff0c\u5982\u679c\u662f\u5982\u4e0a\u8ff0GIF\u622a\u56fe\u6240\u793a\u7684\u6548\u679c\uff0c\u6216\u8005Chrome\u6d4f\u89c8\u5668\u9ed8\u8ba4\u7684\u6548\u679c\uff0c\u5219\u65e0\u80fd\u4e3a\u529b\u3002<\/p>\n<p>\u56e0\u4e3aChrome\u6d4f\u89c8\u5668\u5e76\u672a\u66b4\u9732\u9009\u4e2d\u533a\u57df\u7684\u4f2a\u5143\u7d20\uff0cIE\u6d4f\u89c8\u5668\u662f\u6709\u7684\u3002<\/p>\n<p>\u8fd9\u5c31\u5bfc\u81f4\uff0c\u9009\u4e2d\u533a\u57df\u7684\u9ad8\u4eae\u9700\u8981\u501f\u52a9\u4e00\u70b9JS\u6765\u641e\u5b9a\u3002<\/p>\n<p>\u4e3b\u6d41\u7684\u505a\u6cd5\u662f\u628a\u5f53\u524d\u7684\u8fdb\u5ea6\u503c\u4ee5<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2016\/11\/css-css3-variables-var\/\">CSS\u53d8\u91cf<\/a>\u7684\u5f62\u5f0f\u8d4b\u7ed9input\u5143\u7d20\uff0c\u8fd9\u6837\uff0c\u91cc\u9762\u7684\u6ed1\u5757\u5143\u7d20\u6216\u8005\u6309\u94ae\u5143\u7d20\u5c31\u53ef\u4ee5\u57fa\u4e8e\u8fd9\u4e9bCSS\u53d8\u91cf\u503c\u8fdb\u884c\u9ad8\u4eae\u5b9a\u4f4d\u5904\u7406\u4e86\u3002<\/p>\n<p>\u7531\u4e8eCSS\u53d8\u91cf\u53ef\u4ee5\u8f7b\u677e\u5730\u7a7f\u8d8aShadow DOM\uff0c\u56e0\u6b64\uff0c\u53ef\u4ee5\u653e\u5fc3\u4f7f\u7528\u3002<\/p>\n<p>\u8fd9\u91cc\u6f14\u793a\u5355\u503c\u9009\u62e9\u7684\u9ad8\u4eae\u7684\u5904\u7406\uff1a<\/p>\n<pre>range.addEventListener('input', function () {\r\n    let to = 100 % (this.value - this.min) \/ (this.max - this.min);\r\n    <span style=\"color:green;\">\/\/ \u5355\u503c\u9009\u62e9\u9ad8\u4eae\u8d77\u59cb\u4f4d\u7f6e\u4e00\u5b9a\u662f0<\/span>\r\n    this.style.setProperty('--from', 0);\r\n    this.style.setProperty('--to', to);\r\n});<\/pre>\n<p>\u6b64\u65f6\uff0c\u5c31\u53ef\u4ee5\u6839\u636e\u8bbe\u7f6e\u7684CSS\u81ea\u5b9a\u4e49\u5c5e\u6027\uff0c\u8ba9\u62d6\u62fd\u6761\u5728\u6307\u5b9a\u7684\u4f4d\u7f6e\u5904\u9ad8\u4eae\u7684\uff0c\u53ef\u4ee5\u4f7f\u7528CSS\u6e10\u53d8\u5b9e\u73b0\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>[type=\"range\"]::-webkit-slider-runnable-track {\r\n    height: 4px;\r\n    background: linear-gradient(to right, gray calc(1% * var(--from)), blue calc(1% * var(--from)) calc(1% * var(--to)), gray 0%);\r\n}<\/pre>\n<p>\u8fd9\u6837\uff0c\u4e00\u4e2a\u80cc\u666f\u7070\u8272\uff0c\u9ad8\u4eae\u84dd\u8272\u7684\u533a\u57df\u8303\u56f4\u9009\u62e9\u6761\u6548\u679c\u5c31\u5b9e\u73b0\u4e86\u3002<\/p>\n<p>\u5176\u4e2d\uff0cCSS\u5360\u636e\u4e86\u5927\u7ea680%\u7684\u5b9e\u73b0\uff0cJS\u51fa\u4e86\u4e00\u70b9\u5fae\u5c0f\u7684\u5de5\u4f5c\u3002<\/p>\n<h3>\u4e09\u3001\u6f14\u793a\u4e0e\u5c01\u88c5<\/h3>\n<p>\u4e3a\u4e86\u4f7f\u7528\u65b9\u4fbf\uff0c\u6211\u4eec\u53ef\u4ee5\u5bf9\u591a\u8303\u56f4\u9009\u62e9range\u8f93\u5165\u6846\u8fdb\u884c\u4e00\u4e2a\u5c01\u88c5\uff0c\u4f8b\u5982\u6211\u4eec\u90e8\u5206\u81ea\u5b9a\u4e49\u4e00\u4e2a\u540d\u4e3a<code>&lt;ui-range&gt;<\/code>\u7684\u81ea\u5b9a\u4e49\u5143\u7d20\uff0c\u5f53\u8bbe\u7f6e\u4e86<code>multiple<\/code>\u5c5e\u6027\u7684\u65f6\u5019\uff0c\u5c31\u662f\u8303\u56f4\u9009\u62e9\uff0c\u5f53\u6ca1\u6709<code>multiple<\/code>\u5c5e\u6027\u7684\u65f6\u5019\uff0c\u8fd8\u662f\u4f20\u7edf\u7684\u5355\u503c\u9009\u62e9\u3002<\/p>\n<pre>&lt;ui-range min=\"0\" max=\"100\" value=\"30, 60\" <span style=\"color:#cd0000;\">multiple<\/span>&gt;&lt;\/ui-range&gt;<\/pre>\n<p>\u5728\u5b9e\u73b0\u8fd9\u4e2a\u9700\u6c42\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u7684JS\u5c31\u4f1a\u591a\u5f88\u591a\uff0c\u56e0\u4e3a\u5b9e\u73b0\u81ea\u5b9a\u4e49\u5143\u7d20\u7684\u529f\u80fd\u8fd8\u662f\u9700\u8981\u4e00\u756a\u5904\u7406\u7684\u3002<\/p>\n<p>\u5177\u4f53\u7ec6\u8282\u4e0d\u8868\uff0c\u5927\u5bb6\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/202102\/two-range-input-demo.php\" rel=\"noopener\" target=\"_blank\">&lt;ui-range&gt;\u4e0einput range\u533a\u57df\u8303\u56f4\u9009\u62e9demo<\/a><\/p>\n<p>demo\u9875\u9762\u622a\u56fe\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202102\/2021-02-11_231822.png\" width=\"496\" height=\"257\" alt=\"range\u8303\u56f4\u9009\u62e9\u81ea\u5b9a\u4e49\u5143\u7d20\u5c01\u88c5\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u662f\u4e00\u4e2a\u5178\u578b\u7684\u4f7f\u7528\u4e86Shadow DOM\u5f00\u53d1\u7684Web Components\u7ec4\u4ef6\uff0c\u975e\u5e38\u9002\u5408\u65b0\u4eba\u7684\u5b66\u4e60\u6848\u4f8b\u3002<\/p>\n<p>\u5f53\u7136\uff0c\u8fd8\u6709\u5f88\u591a\u7ec6\u8282\u6ca1\u6709\u5199\u4e0a\u53bb\uff0c\u4f8b\u5982<code>&lt;ui-range&gt;<\/code>\u5143\u7d20\u7684<code>min<\/code>, <code>max<\/code>\u5c5e\u6027\u53d8\u5316\u65f6\u5019\uff0c\u91cc\u9762\u7684range\u8f93\u5165\u6846\u4e5f\u8981\u8ddf\u7740\u53d8\uff0c\u8ddf\u672c\u6587\u5185\u5bb9\u65e0\u5173\u7d27\u8981\uff0c\u6211\u5c31\u6ca1\u5b9e\u73b0\u3002<\/p>\n<h4>\u5176\u4ed6<\/h4>\n<p>\u5982\u679c\u4ee5<code>&lt;ui-range&gt;<\/code>\u81ea\u5b9a\u4e49\u5143\u7d20\u7ec4\u4ef6\u7684\u65b9\u5f0f\u5b9e\u73b0\u8303\u56f4\u9009\u62e9\uff0c\u5176\u5b9e\u9009\u4e2d\u533a\u57df\u7684\u9ad8\u4eae\u6548\u679c\u53ef\u4ee5\u76f4\u63a5\u5199\u5728<code>&lt;ui-range&gt;<\/code>\u5143\u7d20\u4e0a\uff0c\u597d\u5904\u67092\u4e2a\uff1a<\/p>\n<ol>\n<li>\u4ee3\u7801\u91cf\u4f1a\u7701\u4e00\u70b9\uff0c\u56e0\u4e3aChrome\u548cFirefox\u81ea\u5b9a\u4e49\u7684\u4f2a\u5143\u7d20\u4e0d\u4e00\u6837\uff0c\u5199\u5728<code>&lt;ui-range&gt;<\/code>\u5143\u7d20\u5c31\u4e0d\u9700\u8981\u4f2a\u5143\u7d20\u533a\u5206\uff0c\u4ee3\u7801\u53ef\u4ee5\u5408\u4f53\uff1b<\/li>\n<li>\u73b0\u5728\u7684\u5b9e\u73b0\uff0c\u4e24\u4e2arange\u8f93\u5165\u6846\u7684\u5c42\u7ea7\u662f\u56fa\u5b9a\u7684\uff0c\u540e\u9762\u4e00\u4e2a\u4e00\u5b9a\u76d6\u5728\u4e0a\u9762\u4e00\u4e2a\u4e4b\u4e0a\u3002\u5982\u679c\u80cc\u666f\u5199\u5728\u5171\u540c\u7684\u7956\u5148\u5143\u7d20<code>&lt;ui-range&gt;<\/code>\u4e0a\uff0c\u5219\u53ef\u4ee5\u8f7b\u677e\u8ba9:active\u65f6\u5019\uff0c\u8f93\u5165\u6846\u5c42\u7ea7\u8f83\u9ad8\uff0c\u5c31\u53ef\u4ee5\u4fdd\u8bc1\u62d6\u62fd\u7684\u6761\u5b50\u6c38\u8fdc\u5728\u4e0a\u65b9\u4e86\uff0c\u7ec6\u8282\u4f1a\u66f4\u5b8c\u7f8e\u3002<\/li>\n<\/ol>\n<p>\u4f46\u662f\uff0c\u8fd9\u6837\u5904\u7406\u4e0d\u5229\u4e8e\u5b66\u4e60\uff0c\u4ee5\u53ca\u6ca1\u6cd5\u8ba9\u5f00\u53d1\u8005\u8131\u79bb<code>&lt;ui-range&gt;<\/code>\u5143\u7d20\u4f7f\u7528\u3002\u4f8b\u5982\u4e0a\u9762\u7684demo\uff0c\u5c31\u7b97\u6ca1\u6709\u81ea\u5b9a\u4e49\u5143\u7d20\uff0c\u76f4\u63a5\u5149\u79c3\u79c3\u7684range\u8f93\u5165\u6846\uff0c\u6548\u679c\u4e5f\u662fOK\u7684\u3002<\/p>\n<h3>\u56db\u3001\u7ed3\u8bed<\/h3>\n<p>\u4eca\u5929\u5927\u5e74\u4e09\u5341\u9664\u5915\u591c\uff0c\u7ed3\u679c\u6211\u53ea\u987e\u7740\u64b8\u4ee3\u7801\u5199\u6587\u7ae0\uff0c\u6ca1\u6ce8\u610f\u5230\u7fa4\u91cc\u8001\u677f\u53d1\u7684\u5927\u7ea2\u5305\uff0c\u4eba\u5747\u51e0\u767e\u7684\u7ea2\u5305\uff0c\u4ee5\u53ca\u5176\u4ed6\u540c\u4e8bN\u591a\u7ea2\u5305\uff0c\u4e0a\u5343\u6761\u6d88\u606f\uff0c\u88ab\u5bb6\u91cc\u9886\u5bfc\u8bf4\u4e86\u4e00\u987f\u2026\u2026<img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/emtion\/emoji\/1f614.svg\" width=\"20\" height=\"20\" align=\"absmiddle\"><\/p>\n<p>\u5509\uff0c\u62a2\u7ea2\u5305\u591a\u65e0\u804a\uff0c\u8fd8\u662f\u5199\u6587\u7ae0\u6709\u52b2\u3002<\/p>\n<p>\u4e8e\u662f\u6211\u5c31\u628a\u624b\u673a\u7ed9\u9886\u5bfc\uff0c\u81ea\u5df1\u7ee7\u7eed\u5199\uff0c\u4f30\u8ba1\u96f6\u70b9\u4e4b\u524d\u53ef\u4ee5\u53d1\u5e03\uff0c\u54e6\u4e5f\uff01<\/p>\n<p>\u597d\u4e86\uff0c\u5230\u4e86\u795d\u798f\u7684\u65f6\u5019\u4e86\u3002<\/p>\n<p>\u795d\u5e7f\u5927\u524d\u7aef\u540c\u884c\u65b0\u5e74\u5feb\u4e50\uff0c\u725b\u5e74\u5927\u5409\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/emtion\/emoji\/1f389.svg\" width=\"20\" height=\"20\" align=\"absmiddle\"> <img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/emtion\/emoji\/1f389.svg\" width=\"20\" height=\"20\" align=\"absmiddle\"><\/p>\n<p>\u8bb0\u5f97\u7ed9\u672c\u6587\u8f6c\u53d1\u70b9\u8d5e\u54e6~<\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u6b22\u8fce\u5206\u4eab\uff0c\u52ff\u5168\u6587\u8f6c\u8f7d\uff0c\u5982\u679c\u5b9e\u5728\u559c\u6b22\uff0c\u53ef\u6536\u85cf\uff0c\u6c38\u4e0d\u8fc7\u671f\uff0c\u4e14\u4f1a\u53ca\u65f6\u66f4\u65b0\u77e5\u8bc6\u70b9\u53ca\u4fee\u6b63\u9519\u8bef\uff0c\u9605\u8bfb\u4f53\u9a8c\u4e5f\u66f4\u597d\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=9800\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=9800<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202102\/input-range-cover.png\" width=\"160\" height=\"103\" alt=\"\u5c01\u9762\u56fe\u5360\u4f4d\u56fe-\u533a\u57df\u8303\u56f4\u9009\u62e9\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>type=range\u7c7b\u578b\u8f93\u5165\u6846UI\u81ea\u5b9a\u4e49\u517c\u5bb9\u6027\u5f88\u597d\u5f88\u5b9e\u7528\uff0c\u4f46\u662f\u53ea\u662f\u5355\u503c\u9009\u62e9\uff0c\u6709\u6ca1\u6709\u53ef\u80fd\u76f4\u63a5\u4e24\u4e2a\u62d6\u62fd\u6309\u94ae\u5b9e\u73b0\u8303\u56f4\u9009\u62e9\u5462\uff1f\u53ef\u4ee5\u7684\uff0c\u6d3b\u7528CSS\u5373\u53ef\uff0cJS\u53ea\u9700\u505a\u4e00\u70b9\u5fae\u5c0f\u7684\u652f\u6301\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[1506,1706,661,828,1222,1005,1223],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/9800"}],"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=9800"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/9800\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=9800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=9800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=9800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}