{"id":8258,"date":"2018-12-06T00:45:17","date_gmt":"2018-12-05T16:45:17","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=8258"},"modified":"2021-09-14T15:45:17","modified_gmt":"2021-09-14T07:45:17","slug":"css-data-report-html-validate","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2018\/12\/css-data-report-html-validate\/","title":{"rendered":"CSS\u86cb\u75bc\u5e94\u7528\u4e4b\uff1a\u6570\u636e\u4e0a\u62a5\u548cHTML\u9a8c\u8bc1"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=8258\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=8258<\/a><br \/>\n\u672c\u6587\u53ef\u5168\u6587\u8f6c\u8f7d\uff0c\u4e2a\u4eba\u7f51\u7ad9\u65e0\u9700\u6388\u6743\uff0c\u53ea\u8981\u4fdd\u7559\u539f\u4f5c\u8005\u3001\u51fa\u5904\u4ee5\u53ca\u6587\u4e2d\u94fe\u63a5\u5373\u53ef\uff0c\u4efb\u4f55\u7f51\u7ad9\u5747\u53ef\u6458\u8981\u805a\u5408\uff0c\u5546\u7528\u8bf7\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<h3>\u4e00\u3001\u7eafCSS\u5b9e\u73b0\u6570\u636e\u4e0a\u62a5<\/h3>\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u8981\u8ddf\u8e2a\u5e76\u7edf\u8ba1\u67d0\u4e2a\u6309\u94ae\u7684\u70b9\u51fb\u4e8b\u4ef6\uff1a<\/p>\n<pre>.button-1:active::after {\r\n    content: url(.\/pixel.gif?action=click&id=button1);\r\n    display: none;\r\n}\r\n.button-2:active::after {\r\n    content: url(.\/pixel.gif?action=click&id=button2);\r\n    display: none;\r\n}<\/pre>\n<p>\u6b64\u65f6\uff0c\u5f53\u6211\u4eec\u70b9\u51fb\u6309\u94ae\u7684\u65f6\u5019\uff0c\u76f8\u5173\u884c\u4e3a\u6570\u636e\u5c31\u4f1a\u4e0a\u62a5\u7ed9\u670d\u52a1\u5668\uff0c\u8fd9\u79cd\u4e0a\u62a5\uff0c\u5c31\u7b97\u628aJS\u7981\u6389\u4e5f\u65e0\u6cd5\u963b\u6b62\u3002<\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201812\/pure-css-click-event-track.php\" rel=\"noopener\" target=\"_blank\">\u7eafCSS\u8ddf\u8e2a\u7edf\u8ba1\u4e0a\u62a5\u70b9\u51fb\u884c\u4e3ademo<\/a><\/p>\n<p>\u70b9\u51fbdemo\u9875\u9762\u7684\u4e24\u4e2a\u6309\u94ae\uff0c\u53ef\u4ee5\u770b\u5230\u53d1\u51fa\u4e86\u5982\u4e0b\u7684\u8bf7\u6c42\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/2018-12-03_235450.png\" width=\"571\" height=\"250\" alt=\"CSS\u7edf\u8ba1\u70b9\u51fb\u884c\u4e3a\u622a\u56fe\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5f53\u7136\uff0c\u6211\u4eec\u53ef\u4ee5\u7edf\u8ba1\u7684\u4e0d\u4ec5\u4ec5\u662f\u5355\u51fb\u884c\u4e3a\uff0chover\u884c\u4e3a\uff0cfocus\u884c\u4e3a\u90fd\u53ef\u4ee5\u7edf\u8ba1\uff0c\u5f53\u7136\uff0c\u8fd8\u6709\u5f88\u591a\u5176\u4ed6\u65b9\u9762\u7684\u3002\u4f8b\u5982\uff1a<\/p>\n<h4>1. \u4e0d\u652f\u6301CSS3\u6d4f\u89c8\u5668\u6bd4\u4f8b\u7edf\u8ba1<\/h4>\n<pre>.any-element {\r\n   background: url(.\/pixel.gif?css=2);\r\n   background-image: url(.\/pixel.gif?css=3), none;\r\n}<\/pre>\n<p>\u4f8b\u5982\uff0c\u6211\u7684Chrome\u53d1\u51fa\u7684\u56fe\u7247\u8bf7\u6c42\u5730\u5740\u5c31\u662f\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/2018-12-05_230445.png\" width=\"458\" height=\"101\" alt=\"\u4e0a\u62a5\u6570\u636e\u4e3aCSS3\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u7c7b\u4f3c\u7684\uff0c\u6211\u4eec\u53ef\u4ee5\u68c0\u6d4b\u652f\u6301\u5176\u4ed6\u4e00\u4e9bCSS\u5c5e\u6027\u7684\u6bd4\u4f8b\uff0c\u8981\u6bd4\u5355\u7eaf\u770b\u6d4f\u89c8\u5668\u7684\u5360\u6bd4\u8981\u7cbe\u51c6\u7684\u591a\u3002\u56e0\u4e3a\u540c\u6837\u662fChrome\u6d4f\u89c8\u5668\uff0c\u4e0d\u540c\u7528\u6237\u7248\u672c\u53ef\u80fd\u4e0d\u4e00\u6837\uff0c\u8981\u60f3\u51c6\u786e\u77e5\u9053\u67d0\u4e9bCSS\u65b0\u7279\u6027\u652f\u6301\u60c5\u51b5\uff0c\u8fd9\u79cdCSS\u4e0a\u62a5\u65b9\u6cd5\u8981\u66f4\u51c6\u786e\u3002<\/p>\n<p>\u53ef\u4ee5\u4f7f\u7528<code>@supports<\/code>\u89c4\u5219\u3002<\/p>\n<pre>.any-element {\r\n  background: url(.\/pixel.gif?grid=0);\r\n}\r\n@supports (display: grid) {\r\n  .any-element {\r\n    background: url(.\/pixel.gif?grid=1);\r\n  }\r\n}<\/pre>\n<h4>2. retina\u5c4f\u5e55\u5360\u6bd4\u7edf\u8ba1<\/h4>\n<p>\u8981\u4e48\u4e0a\u62a50\uff0c\u8981\u4e48\u4e0a\u62a51\uff0c\u6700\u540e\u53ef\u4ee5\u77e5\u9053retina\u5c4f\u5e55\u7684\u6bd4\u4f8b\u3002<\/p>\n<pre>.any-element {\r\n  background: url(.\/pixel.gif?retina=0);\r\n}\r\n@media screen and (-webkit-min-device-pixel-ratio: 2) {\r\n  .any-element {\r\n    background: url(.\/pixel.gif?retina=1);\r\n  }\r\n}<\/pre>\n<p>\u4f8b\u5982\uff0c\u6211\u5bb6\u91cc\u7684window\u666e\u901a\u663e\u793a\u5c4f\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/2018-12-05_230705.png\" width=\"464\" height=\"128\" alt=\"\u4e0a\u62a5\u5f53\u524d\u663e\u793a\u5668retina\u4e3a0\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u7c7b\u4f3c\u7684\uff0c\u53ef\u4ee5\u68c0\u6d4b\u5bbd\u5c4f\u8bbe\u5907\u6bd4\u4f8b\u7b49\u3002<\/p>\n<h4>3. \u662f\u5426\u652f\u6301\u67d0\u5b57\u4f53<\/h4>\n<p>\u4f8b\u5982\uff0c\u7528\u6237\u662f\u5426\u7535\u8111\u662f\u5426\u5b89\u88c5\u4e86\u601d\u6e90\u9ed1\u4f53\uff1a<\/p>\n<pre>@font-face {\r\n    font-family: anyFontName;\r\n    src: url(..\/image\/pixel.gif?font=unmatch&id=s_h_s);\r\n}\r\n.element-with-text {\r\n    font-family: 'Source Han Sans CN', 'anyFontName';\r\n}<\/pre>\n<p>\u8fd9\u4e2a\u8981\u770bfont\u8bf7\u6c42\uff0c\u5982\u679c\u4f60\u7684\u6d4f\u89c8\u5668\u6ca1\u6709\u5b89\u88c5\u601d\u6e90\u9ed1\u4f53\uff0c\u5219\u4f1a\u5c1d\u8bd5\u52a0\u8f7danyFontName\u8fd9\u4e2a\u5b57\u4f53\uff0c\u4e8e\u662f\u53d1\u8d77\u4e86\u8bf7\u6c42\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/2018-12-05_231011.png\" width=\"551\" height=\"150\" alt=\"\u4e0d\u652f\u6301\u601d\u6e90\u9ed1\u4f53\u8bf7\u6c42\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u5982\u679c\u5b89\u88c5\uff0c\u5219\u6ca1\u6709\u4e0a\u62a5\u3002<\/p>\n<p><span class=\"s\">\/\/zxx: \u5bf9\u4e8e\u4e00\u4e9b\u5e38\u89c1\u4e2d\u6587\u5b57\u4f53\u5728CSS\u4e2d\u7684\u82f1\u6587\u540d\u79f0\uff0c\u53ef\u4ee5\u53c2\u89c1\u6211\u4e4b\u524d\u7684\u7814\u7a76\u6210\u679c\uff1a\u201c<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/2017\/03\/css-font-family-chinese-english\/\">CSS font-family\u5e38\u89c1\u4e2d\u6587\u5b57\u4f53\u5bf9\u5e94\u7684\u82f1\u6587\u540d\u79f0<\/a>\u201d\u3002<\/span><\/p>\n<hr>\n<p>\u4ee5\u4e0a1,2,3\u4e09\u4e2aCSS\u4e0a\u62a5\u6570\u636e\u7684\u5c0f\u6309\u94ae\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\u4eb2\u81ea\u4f53\u9a8c\u4e00\u756a\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201812\/some-css-track.html\" rel=\"noopener\" target=\"_blank\">\u4e00\u4e9bCSS\u8ddf\u8e2a\u4e0a\u62a5\u793a\u610fdemo<\/a><\/p>\n<p>\u9875\u9762\u622a\u56fe\u5982\u4e0b\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/2018-12-05_231419.png\" width=\"235\" height=\"155\" alt=\"\u4e0a\u62a5\u793a\u610f\u9875\u9762\u622a\u56fe\" class=\"alignnone size-medium\" \/><\/p>\n<hr>\n<p>\u6211\u4eec\u8fd8\u53ef\u4ee5\u501f\u52a9\u6d4f\u89c8\u5668\u539f\u751f\u884c\u4e3a\u7b80\u5316\u6211\u4eec\u4e0a\u62a5\u6210\u672c\uff0c\u6bd4\u65b9\u8bf4\u8868\u5355\u9a8c\u8bc1\u51fa\u9519\uff0c\u7528\u6765\u7edf\u8ba1\u7528\u6237\u6ce8\u518c\u6216\u8005\u5176\u4ed6\u91cd\u8981\u8868\u5355\u64cd\u4f5c\u7684\u6210\u529f\u7387\u3002<\/p>\n<p>CSS\u5982\u4e0b\uff1a<\/p>\n<pre>.track:invalid {\r\n    background: url(.\/pixel.gif?action=regist&status=invalid);\r\n}\r\n.track:valid {\r\n    background: url(.\/pixel.gif?action=regist&status=valid);\r\n}<\/pre>\n<p>\u6bcf\u5f53\u8868\u5355\u63d0\u4ea4\u7684\u65f6\u5019\uff0c\u6211\u4eec\u7ed9form\u5143\u7d20\u6dfb\u52a0\u7c7b\u540d<code>.track<\/code>\uff0c\u6b64\u65f6\uff0c\u5176\u4f1a\u81ea\u52a8\u4e0a\u62a5\u8868\u5355\u662f\u5426\u586b\u5199\u5b8c\u5168\u6210\u529f\uff0c<code>:invalid<\/code>\u548c<code>:valid<\/code>\u90fd\u662f\u6807\u51c6\u7684\u539f\u751f\u7684CSS\u4f2a\u7c7b\u9009\u62e9\u5668\uff0c\u6211\u4eec\u65e0\u9700\u81ea\u5df1\u5199\u9a8c\u8bc1\u903b\u8f91\u3002<\/p>\n<p>JS\u5982\u4e0b\uff1a<\/p>\n<pre>forms.addEventListener('submit', function (event) {\r\n    event.preventDefault();\r\n    <span style=\"color:green;\">\/\/ \u4e0a\u62a5\u6210\u529f\u4e0e\u5426<\/span>\r\n    this.classList.add('track');\r\n    <span style=\"color:green;\">\/\/ \u8fd9\u4e2a\u662f\u4e0d\u5f71\u54cd\u539f\u751f\u8868\u5355\u7684\u63d0\u4ea4\u884c\u4e3a\uff0c\u5b9e\u9645\u5f00\u53d1\u591a\u8d70Ajax<\/span>\r\n    if (this.reportValidity()) {\r\n        this.submit();\r\n    }\r\n    setTimeout(function () {\r\n        this.classList.remove('track');\r\n    }.bind(this), 0);    \r\n});<\/pre>\n<p>HTML\u8fd9\u91cc\u4e5f\u9700\u8981novalidate\u5c5e\u6027\u914d\u5408\u4e0b\uff1a<\/p>\n<pre>&lt;form novalidate&gt;&lt;\/form&gt;<\/pre>\n<p>\u773c\u89c1\u4e3a\u5b9e\uff0c\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/study\/201812\/form-validate-data-report-track.php\" rel=\"noopener\" target=\"_blank\">\u8868\u5355\u9a8c\u8bc1\u51fa\u9519\u4e0e\u6570\u636e\u4e0a\u62a5demo<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/css-validate.gif\" width=\"573\" height=\"240\" alt=\"\u8868\u5355\u9a8c\u8bc1\u4e0d\u901a\u8fc7\u63d0\u793a\u9519\u8bef\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u4e0d\u8fc7\uff0c\u8fd9\u79cd\u65b9\u6cd5\u6709\u4e2a\u7f3a\u9677\uff0c\u65e0\u8bba\u6210\u529f\u4e0e\u5931\u8d25\uff0c\u53ea\u80fd\u4e0a\u62a5\u4e00\u6b21\u3002<\/p>\n<p>\u8868\u5355\u7684<code>reportValidity()<\/code>\u65b9\u6cd5\u867d\u7136\u5f88\u7701\u529b\uff0c\u4f46\u662f\u4f1a\u547c\u8d77\u6d4f\u89c8\u5668\u539f\u751f\u7684\u63d0\u793a\uff0c\u8fc7\u4e0d\u4e86\u8bbe\u8ba1\u5e08\u90a3\u4e00\u5173\u7684\uff0c\u56e0\u6b64\uff0c\u6069\uff0c\u5927\u5bb6high\u4e00\u4e0b\u5373\u53ef\u3002<\/p>\n<h3>\u4e8c\u3001\u7eafCSS\u5b9e\u73b0HTML\u9a8c\u8bc1\u4e0e\u63d0\u793a<\/h3>\n<p>\u518d\u8bf4\u8bf4\u53e6\u5916\u4e00\u4e2a\u7eafCSS\u5e94\u8be5\uff0c\u90a3\u5c31\u662f\u8fdb\u884cHTML\u9a8c\u8bc1\uff0c\u5e76\u4e14\u76f4\u63a5\u5728\u9875\u9762\u4e0a\u8f93\u51fa\u6765\u3002<\/p>\n<p>\u4e3e\u4e2a\u7b80\u5355\u4f8b\u5b50\uff0c\u56fe\u7247\u5982\u679c\u7a7a<code>alt<\/code>\u5c5e\u6027\uff0c\u5219\u9ad8\u4eae\u8fd9\u4e2a\u56fe\u7247\uff1a<\/p>\n<pre>img[alt=\"\"] { outline: 2px solid red; }<\/pre>\n<p>\u53c8\u6216\u8005<code>_blank<\/code>\u94fe\u63a5\u7684<code>rel<\/code>\u5c5e\u6027\u6ca1\u6709\u52a0<code>noopener<\/code>\u548c<code>noreferrer<\/code>\u3002<\/p>\n<pre>a[target=\"_blank\"]:not([rel=\"noopener noreferrer\"]) { outline: 2px solid red; }<\/pre>\n<p>\u8bf8\u5982\u6b64\u7c7b\u3002<\/p>\n<p>\u7136\u540e\u914d\u5408\u4f2a\u5143\u7d20\u5728\u9875\u9762\u4e0a\u663e\u793a\u63d0\u793a\u7684\u6587\u5b57\uff1a<\/p>\n<pre>script[src]:not([async]) {\r\n  display: block;\r\n}\r\nscript[src]:not([async])::after {\r\n  content: '\u8bd5\u8bd5\u7ed9\u5e26\u6709[src=\"\u2026\"]\u7684&lt;script&gt;\u5143\u7d20\u6dfb\u52a0[async]\u5c5e\u6027';\r\n}<\/pre>\n<p>\u7136\u540e\uff0c\u5c31\u6709\u6e05\u95f2\u7684\u6709\u5fd7\u4e4b\u58eb\u8fd8\u4e13\u95e8\u641e\u4e86\u4e2a\u901a\u8fc7CSS\u9a8c\u8bc1\u68c0\u6d4bHTML\u5408\u6cd5\u6027\u7684CSS\u5e93\uff0c\u540d\u4e3aconstruct.css\uff0c\u9879\u76ee\u5730\u5740\u4e3a\uff1a<a href=\"https:\/\/github.com\/t7\/construct.css\" rel=\"noopener noreferrer\" target=\"_blank\">https:\/\/github.com\/t7\/construct.css<\/a><\/p>\n<p>\u8fd9\u91cc<a href=\"https:\/\/t7.github.io\/construct.css\/example-invalid.html\" rel=\"noopener\" target=\"_blank\">\u6709\u4e2ademo<\/a>\uff0c\u6709\u5174\u8da3\u7684\u53ef\u4ee5\u8fdb\u53bb\u7785\u7785\u3002<\/p>\n<p>\u4f7f\u7528\u5f88\u7b80\u5355\uff0c\u4f60\u7684\u9879\u76ee\u5f15\u5165\u8fd9\u4e2aCSS\uff0c\u90a3\u4e9b\u4f7f\u7528\u6709\u95ee\u9898\u7684HTML\u5c31\u4f1a\u6807\u8bb0\u5e76\u63d0\u793a\uff0c\u7c7b\u4f3c\u4e0b\u9762\u622a\u56fe\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/2018-12-06_001713.png\" width=\"537\" height=\"726\" alt=\"CSS\u6807\u8bb0HTML\u51fa\u9519\u793a\u610f\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u7136\u800c\uff0c\u6709\u4e9b\u63d0\u793a\u561b\uff0c\u54b3\u54b3\uff0c\u6709\u4e9b\u7275\u5f3a\u9644\u4f1a\u4e86\uff0c\u5927\u5bb6\u5f53\u65b0\u95fb\u516b\u5366\u770b\u770b\u5c31\u597d\u4e86\u3002<\/p>\n<h3>\u4e09\u3001\u4e3a\u4ec0\u4e48\u8bf4\u662f\u86cb\u75bc\u5e94\u7528<\/h3>\n<p>\u672c\u6587\u63d0\u5230\u7684\u4e24\u4e2aCSS\u7684\u65b0\u5947\u5e94\u7528\uff0c\u600e\u4e48\u8bf4\u5462\uff0c\u6709\u70b9\u50cf\u624b\u5de5\u803f\u54e5\u7684\u7684\u5404\u79cd\u624b\u5de5\u4f5c\u54c1\uff0c\u5f88\u6709\u65b0\u610f\uff0c\u5f88\u6709\u7279\u8272\uff0c\u53ef\u60dc\uff0c\u5e76\u4e0d\u5b9e\u7528\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/2018-12-06_002445.png\" width=\"412\" height=\"275\" alt=\"\u96f7\u795e\u9524\u5305\" class=\"alignnone size-medium\" \/><\/p>\n<p>\u6bd4\u65b9\u8bf4\u4e00\u5f00\u59cb\u7684\u6570\u636e\u4e0a\u62a5\uff0c\u5c40\u9650\u5f88\u5927\uff0c\u5f88\u591a\u884c\u4e3a\u4f60\u65e0\u6cd5\u7edf\u8ba1\uff1b\u53e6\u5916\u7ef4\u62a4\u975e\u5e38\u4e0d\u65b9\u4fbf\uff0c\u628a\u4e00\u5927\u5806URL\u5730\u5740\u585e\u5230CSS\u4e2d\uff0c\u56de\u5934\u8981\u662f\u6539\u4e2a\u4ec0\u4e48\u4e1c\u897f\uff0c\u5f88\u5570\u55e6\u7684\u3002CSS\u662f\u504f\u524d\u524d\u7aef\u7684\u73a9\u5177\uff0c\u800c\u6570\u636e\u4e0a\u62a5\u504f\u540e\u7684\u524d\u7aef\u66f4\u5408\u9002\uff0c\u5b9e\u9645\u5f00\u53d1\u80af\u5b9a\u4e0d\u4f1a\u8fd9\u4e48\u73a9\u7684\uff0c\u4eba\u529b\u8d44\u6e90\u5229\u7528\u5b8c\u5168\u6ca1\u6709\u6700\u5927\u5316\u561b\u3002<\/p>\n<p>\u8fd8\u6709\u90a3\u4e2aHTML\u9a8c\u8bc1\uff0c\u8fd9\u5e74\u5934\uff0c\u8fd8\u6709\u8c01\u5173\u5fc3HTML\u8bed\u4e49\uff0c\u7ed3\u6784\u5565\u7684\u561b\uff0c\u5c0f\u7a0b\u5e8f\uff0cVue\u8fd9\u79cdHTML\u7ed3\u6784\u90fd\u662f\u81ea\u5b9a\u4e49\u7684\uff0c\u548c\u6807\u51c6\u8d8a\u8d70\u8d8a\u8fdc\u4e86\uff0c\u6ca1\u6709\u5e02\u573a\uff0c\u5c31\u6ca1\u6709\u4ef7\u503c\u3002\u800c\u4e14\u91cc\u9762\u5f88\u591a\u9a8c\u8bc1\uff0c\u6709\u4e9b\u60f3\u5f97\u592a\u591a\uff0c\u7a7adiv\u4e3a\u4ec0\u4e48\u5c31\u4e0d\u80fd\u5b58\u5728\u5462\uff1f\u6211\u5c31\u60f3\u4e0d\u901a\u4e86\u3002<\/p>\n<p>\u56e0\u6b64\u770b\u6765\uff0c\u672c\u6587\u4ecb\u7ecd\u7684\u8fd9\u4e24\u4e2aCSS\u5e94\u7528\uff0c\u53ea\u9002\u5408\u8fdc\u89c2\uff0c\u4e0d\u9002\u5408\u4eb5\u73a9\u3002<\/p>\n<p>\u4ee5\u4e0a\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/emtion\/emoji\/1f436.svg\" width=\"20\" height=\"20\" align=\"absmiddle\"><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u4f1a\u7ecf\u5e38\u66f4\u65b0\u77e5\u8bc6\u70b9\u4ee5\u53ca\u4fee\u6b63\u4e00\u4e9b\u9519\u8bef\uff0c\u56e0\u6b64\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u539f\u51fa\u5904\uff0c\u65b9\u4fbf\u6eaf\u6e90\uff0c\u907f\u514d\u9648\u65e7\u9519\u8bef\u77e5\u8bc6\u7684\u8bef\u5bfc\uff0c\u540c\u65f6\u6709\u66f4\u597d\u7684\u9605\u8bfb\u4f53\u9a8c\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=8258\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=8258<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"\/\/image.zhangxinxu.com\/image\/blog\/201812\/screen-code.png\" width=\"160\" height=\"100\" class=\"alignright size-medium\" \/><\/p>\n<p>\u4ecb\u7ecd\u4e24\u4e2a\u6211\u89c9\u5f97\u6bd4\u8f83\u86cb\u75bc\u4f46\u6709\u610f\u601d\u7684CSS\u5e94\u7528\uff0c\u4e00\u4e2a\u5c31\u662f\u7eafCSS\u5b9e\u73b0\u6570\u636e\u4e0a\u62a5\uff0c\u7528\u6237\u884c\u4e3a\u8ddf\u8e2a\uff1b\u53e6\u5916\u4e00\u4e2a\u5c31\u662f\u7eafCSS\u5b9e\u73b0HTML\u9a8c\u8bc1\uff0c\u5e76\u4e14\u5728\u9875\u9762\u4e0a\u8fdb\u884c\u63d0\u793a\u3002\u6bd4\u8f83\u6709\u8111\u6d1e\uff0c\u6709\u60f3\u6cd5\uff0c\u867d\u7136\u4ee5\u540e\u4f30\u8ba1\u7528\u4e0d\u5230\uff0c\u4f46\u662f\uff0c\u5176\u4e2d\u65b0\u5947\u7684\u601d\u8def\u8bf4\u4e0d\u5b9a\u5bf9\u4e8e\u6211\u4eec\u5f00\u9614\u773c\u754c\u5f88\u6709\u5e2e\u52a9\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1390,825,1271,743,1290,1389,1388,1227,823,1121,1784],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/8258"}],"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=8258"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/8258\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=8258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=8258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=8258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}