{"id":27410,"date":"2024-11-24T14:46:37","date_gmt":"2024-11-24T06:46:37","guid":{"rendered":"https:\/\/fwq.ai\/blog\/27410\/"},"modified":"2024-11-24T14:46:37","modified_gmt":"2024-11-24T06:46:37","slug":"%e5%a6%82%e4%bd%95%e8%a7%a3%e5%86%b3%e8%87%aa%e5%ae%9a%e4%b9%89-input-checkbox-%e6%a0%b7%e5%bc%8f%e5%9c%a8%e4%b8%8d%e5%90%8c%e5%88%86%e8%be%a8%e7%8e%87%e4%b8%8b%e5%b1%85%e4%b8%ad%e6%95%88%e6%9e%9c","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/27410\/","title":{"rendered":"\u5982\u4f55\u89e3\u51b3\u81ea\u5b9a\u4e49 input checkbox \u6837\u5f0f\u5728\u4e0d\u540c\u5206\u8fa8\u7387\u4e0b\u5c45\u4e2d\u6548\u679c\u53d1\u751f\u50cf\u7d20\u504f\u79fb\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173124129526279.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u89e3\u51b3\u81ea\u5b9a\u4e49 input checkbox \u6837\u5f0f\u5728\u4e0d\u540c\u5206\u8fa8\u7387\u4e0b\u5c45\u4e2d\u6548\u679c\u53d1\u751f\u50cf\u7d20\u504f\u79fb\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u89e3\u51b3\u81ea\u5b9a\u4e49 input checkbox \u6837\u5f0f\u5728\u4e0d\u540c\u5206\u8fa8\u7387\u4e0b\u5c45\u4e2d\u6548\u679c\u53d1\u751f\u50cf\u7d20\u504f\u79fb\uff1f\u63d2\u56fe\" \/><\/p>\n<h2>\u76d2\u5b50\u91cc\u7684\u5143\u7d20\u53d1\u751f\u9884\u671f\u5916\u7684\u50cf\u7d20\u504f\u79fb\uff1f<\/h2>\n<p>\u5728\u4f7f\u7528\u81ea\u5b9a\u4e49\u7684 input checkbox \u9009\u62e9\u6846\u6837\u5f0f\u65f6\uff0c\u53d1\u73b0\u4e0d\u540c\u5206\u8fa8\u7387\u4e0b\u5c45\u4e2d\u6548\u679c\u4f1a\u504f\u79fb\uff0c\u4e14\u5728\u9009\u4e2d\u72b6\u6001\u4e0b\u7ea2\u8272\u5c0f\u5143\u7d20\u76f8\u5bf9\u4e8e\u5916\u6846\u4e0d\u5c45\u4e2d\u3002\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<pre>&lt;style&gt;\n  .clause-content {\n    display: flex;\n    flex-direction: row;\n    align-items: start;\n  }\n\n  .clause-input {\n    display: inline-block;\n    vertical-align: middle;\n    width: 15px;\n    height: 15px;\n    cursor: pointer;\n    position: relative;\n    background-color: #fff;\n    margin-right: 12px;\n    border: 1px solid rgba(237, 30, 14, 0.15);\n  }\n\n  .clause-input input {\n    opacity: 0;\n  }\n\n  .clause-input input:checked+i {\n    width: 10px;\n    height: 10px;\n    position: absolute;\n    left: 50%;\n    top: 50%;\n    margin-left: -5px;\n    margin-top: -5px;\n    \/* transform: translate(-50%, -50%); *\/\n    background-color: #ed1c24;\n  }\n&lt;\/style&gt;\n&lt;div class=\"clause-content\"&gt;\n  &lt;label class=\"clause-input checkbox-hack\"&gt;\n    &lt;input type=\"checkbox\" name=\"clauseenquiry\" class=\"js_clauseenquiry\" id=\"clauseenquiry\"&gt;\n    &lt;i&gt;&lt;\/i&gt;\n  &lt;\/label&gt;\n  &lt;label class=\"clause-text\" for=\"clauseenquiry\"&gt;clause.&lt;\/label&gt;\n&lt;\/div&gt;<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u539f\u56e0\uff1a\u5728\u4e0d\u540c\u5206\u8fa8\u7387\u4e0b\uff0c\u4f7f\u7528\u50cf\u7d20\u4f5c\u4e3a\u5355\u4f4d\u4f1a\u5bfc\u81f4\u50cf\u7d20\u70b9\u79fb\u4f4d\u3002<\/p>\n<p>\u89e3\u51b3\u65b9\u6848\uff1a\u5c06\u6240\u6709\u50cf\u7d20\u503c\u6362\u6210\u76f8\u5bf9\u5355\u4f4d\u3002\u4f8b\u5982\uff1a<\/p>\n<pre>.clause-content {\n  display: flex;\n  flex-direction: row;\n  align-items: start;\n}\n\n.clause-input {\n  display: inline-block;\n  vertical-align: middle;\n  width: 1rem;\n  height: 1rem;\n  cursor: pointer;\n  position: relative;\n  background-color: #fff;\n  margin-right: 0.8rem;\n  border: 0.1rem solid rgba(237, 30, 14, 0.15);\n}\n\n.clause-input input {\n  opacity: 0;\n}\n\n.clause-input input:checked + i {\n  width: 0.6rem;\n  height: 0.6rem;\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  margin-left: -0.3rem;\n  margin-top: -0.3rem;\n  \/* transform: translate(-50%, -50%); *\/\n  background-color: #ed1c24;\n}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u89e3\u51b3\u81ea\u5b9a\u4e49 input checkbox \u6837\u5f0f\u5728\u4e0d\u540c\u5206\u8fa8\u7387\u4e0b\u5c45\u4e2d\u6548\u679c\u53d1\u751f\u50cf\u7d20\u504f\u79fb\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u76d2\u5b50\u91cc\u7684\u5143\u7d20\u53d1\u751f\u9884\u671f\u5916\u7684\u50cf\u7d20\u504f\u79fb\uff1f \u5728\u4f7f\u7528\u81ea\u5b9a\u4e49\u7684 input checkbox \u9009\u62e9\u6846\u6837\u5f0f\u65f6\uff0c\u53d1\u73b0\u4e0d\u540c\u5206\u8fa8\u7387\u4e0b\u5c45\u4e2d\u6548\u679c\u4f1a\u504f\u79fb\uff0c\u4e14\u5728\u9009\u4e2d\u72b6\u6001\u4e0b\u7ea2\u8272\u5c0f\u5143\u7d20\u76f8\u5bf9\u4e8e\u5916\u6846\u4e0d\u5c45\u4e2d\u3002\u4ee3\u7801\u5982\u4e0b\uff1a &lt;style&gt; .clause-content { display: flex; flex-direction: row; align-items: start; } .clause-input { display: inline-block; vertical-align: middle; width: 15px; height: 15px; cursor: pointer; position: relative; background-color: #fff; margin-right: 12px; border: 1px solid rgba(237, 30, 14, 0.15); } .clause-input input { opacity: 0; } .clause-input input:checked+i { width: 10px; height: 10px; position: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-27410","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=27410"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/27410\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=27410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=27410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=27410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}