{"id":4519,"date":"2014-12-28T23:12:52","date_gmt":"2014-12-28T15:12:52","guid":{"rendered":"http:\/\/www.zhangxinxu.com\/wordpress\/?p=4519"},"modified":"2018-06-11T23:11:04","modified_gmt":"2018-06-11T15:11:04","slug":"css3-animation-dotting-loading","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2014\/12\/css3-animation-dotting-loading\/","title":{"rendered":"\u518d\u8bf4CSS3 animation\u5b9e\u73b0\u70b9\u70b9\u70b9loading\u52a8\u753b"},"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=4519\">http:\/\/www.zhangxinxu.com\/wordpress\/?p=4519<\/a><\/p>\n<p><strong>\u8865\u5145\u4e8e2018-06-11<\/strong><br \/>\n\u76ee\u524d\u6700\u597d\u7684\u5b9e\u73b0\u53c2\u89c1\u8fd9\u7bc7\u6587\u7ae0\uff1a\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/2016\/11\/css-content-pre-animation-character-loading\/\">CSS content\u6362\u884c\u6280\u672f\u5b9e\u73b0\u5b57\u7b26animation loading\u6548\u679c<\/a>\u201d\uff0c\u6bd4\u6587\u7ae0\u6700\u540e\u8865\u5145\u7684\u5b9e\u73b0\u8fd8\u8981\u597d\u3002<\/p>\n<style>.dotting {\tdisplay: inline-block; min-width: 2px; min-height: 2px;\tbox-shadow: 2px 0 currentColor, 6px 0 currentColor, 10px 0 currentColor; \t-webkit-animation: dot 4s infinite step-start both;\tanimation: dot 4s infinite step-start both;\t*zoom: expression(this.innerHTML = '...');}.dotting:before { content: '...'; }.dotting::before { content: ''; }:root .dotting { margin-right: 8px; }@-webkit-keyframes dot {\t25% { box-shadow: none; }\t50% { box-shadow: 2px 0 currentColor; }    75% { box-shadow: 2px 0 currentColor, 6px 0 currentColor; }}@keyframes dot {\t25% { box-shadow: none; }\t50% { box-shadow: 2px 0 currentColor; }    75% { box-shadow: 2px 0 currentColor, 6px 0 currentColor; }}.dotting2 {\tdisplay: inline-block; width: 10px; min-height: 2px;\tborder-left: 2px solid currentColor; border-right: 2px solid currentColor;\tbackground-color: currentColor;\tbackground-clip: content-box;\tbox-sizing: border-box;\t-webkit-animation: dot2 4s infinite step-start both;\tanimation: dot2 4s infinite step-start both;\t*zoom: expression(this.innerHTML = '...');}.dotting2:before { content: '...'; }.dotting2::before { content: ''; }:root .dotting2 { margin-left: 2px; padding-left: 2px; padding-right: 2px; }@-webkit-keyframes dot2 {\t25% { border-color: transparent; background-color: transparent; }\t50% { border-right-color: transparent; background-color: transparent; }    75% { border-right-color: transparent; }}@keyframes dot2 {\t25% { border-color: transparent; background-color: transparent; }\t50% { border-right-color: transparent; background-color: transparent; }    75% { border-right-color: transparent; }}<\/style>\n<h3>\u4e00\u3001\u518d\u7eed\u524d\u7f18<span class=\"dotting\"><\/span><\/h3>\n<p>\u53bb\u5e74\u590f\u5929\uff0c\u5199\u4e86\u7bc7\u540d\u4e3a\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=3411\">CSS3 animation\u6e10\u8fdb\u5b9e\u73b0\u70b9\u70b9\u70b9\u7b49\u5f85\u63d0\u793a\u6548\u679c<\/a>\u201d\u7684\u6587\u7ae0\uff0c\u4e3b\u8981\u5185\u5bb9\u662f\u5b9e\u73b0\u7c7b\u4f3c\u4e0b\u9762\u6253\u70b9\u7b49\u5f85\u63d0\u793a\u6548\u679c\uff0c\u6bd4\u5e72\u5df4\u5df4\u7684\u5b57\u7b26<code>...<\/code>\u8981\u66f4\u4eba\u6027\u5316\uff1a<br \/>\n<img loading=\"lazy\" decoding=\"async\" data-src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201306\/dot.gif\" width=\"146\" height=\"46\" alt=\"\u70b9\u70b9\u70b9gif\u52a8\u753b\u6548\u679c\" class=\"mt10\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201306\/dot.gif\"><\/p>\n<p>\u4e4b\u524d\u5b9e\u73b0\u7684\u539f\u7406\u662f\u901a\u8fc7\u5bbd\u5ea6\u548c<code>margin<\/code>\u63a7\u5236\u5b9e\u73b0\uff0c\u4f46\u662f\uff0c\u95ee\u9898\u975e\u5e38\u660e\u663e\uff0c\u5b57\u7b26\u5bbd\u5ea6\u53d7\u5236\u4e8e\u5b57\u4f53\uff0c\u4f8b\u5982\u79fb\u52a8\u7aef\uff0c\u6ca1\u6709\u5b8b\u4f53\uff0c\u5b57\u7b26\u53ef\u80fd\u5c31\u4f1a\u88ab\u534a\u8def\u526a\u88c1\uff0c\u4ece\u800c\u51fa\u73b0\u663e\u793a<code>bug<\/code>, \u7528\u8ba1\u7b97\u673a\u672f\u8bed\u63cf\u8ff0\u5c31\u662f\u201c\u5065\u58ee\u6027\u4e0d\u8db3\u201d\u3002<\/p>\n<p>\u4e0a\u5468\uff0c\u5b9e\u73b0\u67d0\u8f7d\u5165\u63d0\u793a\u65f6\u5019\uff0c\u4e0a\u9762\u5708\u5708\u8f6c\uff0c\u4e0b\u9762\u5c31\u662f\u5e72\u5df4\u5df4\u7684\u9759\u6001\u6587\u5b57\uff1a\u201c\u6570\u636e\u5bfc\u5165\u4e2d&#8230;\u201d~<\/p>\n<p>\u7531\u4e8e\u5fd8\u8bb0\u5403\u836f\uff0c\u6211\u201c\u770b\u4e1c\u897f\u4e0d\u987a\u773c\u201d\u7684\u75c5\u5c31\u72af\u4e86\uff0c\u5fc3\u4e2d\u4e0d\u505c\u5730\u7ea0\u7ed3\uff1a\u201c\u8fd9<code>...<\/code>\u8981\u662f\u80fd\u7528CSS\u52a8\u8d77\u6765\u5c31\u597d\u4e86\uff01\u6210\u672c\u53c8\u4f4e\uff0c\u6548\u679c\u53c8\u597d\uff0c\u6027\u4ef7\u6bd4\u8d85\u9ad8\uff0c\u4e00\u52b3\u6c38\u9038\uff0c\u591a\u597d\u554a\uff01\u201d<\/p>\n<p>\u867d\u7136\u5fd9\u5230\u4e24\u6ce1\u5c3f\u6512\u6210\u4e00\u5927\u6ce1\u624d\u53bb\u5395\u6240\u7684\u7a0b\u5ea6\uff0c\u8fd8\u662f\u8d81\u7740\u996d\u70b9\u6363\u817e\u4e86\u51e0\u4e0b\u3002\u9996\u5148\u770b\u770b\u4ee5\u524d\u7684\u601d\u8def\uff0c\u786e\u5b9a\u4e0d\u80fd\u5728\u5b9e\u9645\u9879\u76ee\u4f7f\u7528\uff0c\u4e8e\u662f\uff0c\u5f00\u8111\u6d1e\u60f3\u60f3\u6709\u6ca1\u6709\u5176\u4ed6\u66f4\u597d\u7684\u65b9\u5f0f\u5b9e\u73b0\u6253\u70b9\u52a8\u753b\u6548\u679c\uff08\u5f53\u7136\uff0c\u8981\u6e10\u8fdb\u517c\u5bb9\uff09\u3002\u8fd9\u4e00\u5e74\u591a\u5b66\u4e60\u4e0d\u6b62\uff0c\u8fd8\u662f\u6709\u4e00\u4e9b\u79ef\u7d2f\u7684\uff0c\u5f88\u5feb\u6298\u817e\u4e86\u4e00\u4e2a\u6bd4\u4ee5\u524d\u7684\u5b9e\u73b0\u66f4\u52a0\u9760\u8c31\u7684\u65b9\u6cd5\uff0c\u5229\u7528CSS3 <code>xxx-xxxxxx<\/code>\u5c5e\u6027\u5b9e\u73b0\uff0c<img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/99.gif\" align=\"absmiddle\"> IE6+\u90fd\u80fd\u6b63\u5e38\u663e\u793a\uff0c\u989c\u8272\u8ddf\u968f\u6587\u5b57\u53d8\u5316\uff0c\u770b\u4e0a\u53bb\u5f88\u8d5e\uff0c\u7136\u800c\u8fd8\u662f\u6709\u7455\u75b5\u3002\u4e8e\u662f\uff0c\u5468\u672b\u6574\u7406demo\u7684\u65f6\u5019\u987a\u4fbf\u5b9e\u8df5\u4e86\u81ea\u5df1\u7684\u53e6\u5916\u4e00\u4e2a\u60f3\u6cd5\uff0c\u53d1\u73b0\u6548\u679c\u679c\u7136\u5982\u81ea\u5df1\u6240\u6599\uff0c\u8fd9\u662f\u4e00\u4e2a\u66f4perfect\u7684\u65b9\u6cd5\u3002\u8d81\u7740\u521a\u53bb\u4e07\u8fbe\u770b\u5b8c\u300a\u667a\u53d6\u5a01\u864e\u5c71\u300b\u6709\u70b9high\uff0c\u7279\u610f\u5206\u4eab\u4e0b<span class=\"dotting\"><\/span><br \/>\n<\/span><\/p>\n<h3>\u4e8c\u3001\u57fa\u4e8ebox-shadow\u5b9e\u73b0\u7684\u6253\u70b9\u6548\u679c<span class=\"dotting\"><\/span><\/h3>\n<p>\u7406\u8bba\u4e0a\uff0c<code>box-shadow<\/code>\u53ef\u4ee5\u5b9e\u73b0\u4efb\u610f\u7684\u56fe\u5f62\u6548\u679c\uff0c\u53ef\u53c2\u8003\u6211\u53bb\u5e74\u5199\u7684\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=3813\">CSS3 box-shadow\u76d2\u9634\u5f71\u56fe\u5f62\u751f\u6210\u6280\u672f<\/a>\u201d\u4e00\u6587\uff0c\u81ea\u7136\u6211\u4eec\u53ef\u4ee5\u5229\u7528<code>box-shadow<\/code>\u751f\u6210\u6211\u4eec\u7684\u70b9\u6548\u679c\uff0c\u7136\u540e\u901a\u8fc7<code>animation<\/code>\u63a7\u5236\u4e0d\u540c\u65f6\u95f4\u70b9\u70b9\u7684\u6570\u76ee\u5c31\u53ef\u4ee5\u5b9e\u73b0\u70b9\u70b9\u70b9<code>...<\/code> loading\u6548\u679c\u4e86~<\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a class=\"a_link\" href=\"http:\/\/www.zhangxinxu.com\/study\/201412\/animation-box-shadow-dot-dot-dot-wait.html\" target=\"_blank\">CSS3 animation box-shadow\u6e10\u8fdb\u5b9e\u73b0\u6253\u70b9\u52a8\u753bdemo<\/a><\/p>\n<p><strong>1. \u6e10\u8fdb\u517c\u5bb9<\/strong><br \/>\n\u5404\u4e2a\u6d4f\u89c8\u5668\u4e0b\u7684\u6548\u679c\u5206\u522b\u5982\u4e0b\u8868\uff1a<\/p>\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"params_table\">\n<tr>\n<th scope=\"col\">IE7<\/th>\n<th scope=\"col\">IE8<\/th>\n<th scope=\"col\">IE9<\/th>\n<th scope=\"col\">IE10\/IE11(gif)<\/th>\n<th scope=\"col\">Chrome(gif)<\/th>\n<th scope=\"col\">FireFox(gif)<\/th>\n<\/tr>\n<tr align=\"center\">\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/2014-12-28_111130.png\" width=\"238\" height=\"166\" alt=\"IE7\u622a\u56fe\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/2014-12-28_203435.png\" width=\"219\" height=\"151\" alt=\"IE8\u622a\u56fe\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/2014-12-28_203525.png\" width=\"196\" height=\"135\" alt=\"IE9\u622a\u56fe\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/dotting-box-shadow-ie.gif\" width=\"117\" height=\"31\" alt=\"IE10\/IE11 git\u52a8\u753b\u6548\u679c\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/dotting-box-shadow-chrome.gif\" width=\"120\" height=\"31\" alt=\"Chrome\u6d4f\u89c8\u5668gif\u52a8\u753b\u6548\u679c\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/dotting-box-shadow-firefox.gif\" width=\"122\" height=\"31\" alt=\"FireFox\u6d4f\u89c8\u5668\u4e0b\u52a8\u753b\u6548\u679c\"><\/td>\n<\/tr>\n<\/table>\n<p>\u652f\u6301CSS3 <code>animation<\/code>\u52a8\u753b\u7684\u6d4f\u89c8\u5668\u663e\u793a\u7684\u5c31\u662f\u6253\u70b9\u52a8\u753b\u6548\u679c\uff1b\u5bf9\u4e8e\u4e0d\u652f\u6301\u7684\u6d4f\u89c8\u5668\uff0cIE7\/IE8\u663e\u793a\u7684\u662f\u771f\u5b9e\u7684\u5b57\u7b26<code>...<\/code>, IE9\u6d4f\u89c8\u5668\u867d\u7136\u4e5f\u662fCSS3\u751f\u6210\uff0c\u4f46\u662f\u662f\u9759\u6001\u7684\uff0c\u6ca1\u6709\u52a8\u753b\u6548\u679c\uff1b\u6b64\u4e43\u6e10\u8fdb\u517c\u5bb9\u3002<\/p>\n<p><strong>2. \u5b9e\u73b0\u539f\u7406<\/strong><br \/>\n\u9996\u5148HTML\u975e\u5e38\u7b80\u5355\uff0c\u5c31\u662f\u4e00\u4e2a\u6807\u7b7e\u4e00\u4e2a\u7c7b\u540d\uff08\u6807\u7b7e\u91cc\u9762\u4e00\u5b9a\u8981\u7a7a\u7a7a\u5982\u4e5f\uff09\uff0c\u5176\u4ed6\u4ec0\u4e48\u90fd\u4e0d\u9700\u8981\u5173\u5fc3\uff0c\u5c31\u53ef\u4ee5\u6e38\u5203\u51e0\u4e4e\u5404\u79cd\u573a\u666f\uff0c\u5982\u4e0b\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>\u8ba2\u5355\u63d0\u4ea4\u4e2d<span style=\"color:#cd0000;\">&lt;span class=\"dotting\">&lt;\/span><\/span><\/pre>\n<\/div>\n<p>\u4e0a\u9762\u4ee3\u7801\u8fd9\u4e2a\u7c7b\u540d\u4e3a<code>dotting<\/code>\u7684<code>span<\/code>\u5c31\u662f\u6211\u4eec\u6240\u6709\u7684\u7384\u673a\u6240\u5728\uff0c\u9875\u9762\u4efb\u610f\u5730\u65b9\uff0c\u53ea\u8981\u6709\u8fd9\u4e00\u5c0f\u64aeHTML\u5c31\u53ef\u4ee5\u6709\u6253\u70b9\u52a8\u753b\uff0c\u4e0e\u6587\u5b57\u6df7\u6392\u826f\u597d\uff0c\u4e14\u989c\u8272\u81ea\u52a8\u5339\u914d\u3002\u4f8b\u5982\uff0c\u672c\u6587\u201c\u6807\u9898\u4e00\u201d\u548c\u201c\u6807\u9898\u4e8c\u201d\u540e\u9762\u7684\u70b9\u70b9\u70b9\u52a8\u753b\u5c31\u662f\u6dfb\u52a0\u4e86\u8fd9\u4e48\u70b9HTML.<\/p>\n<p>\u4e0b\u9762\u662f\u4e07\u4f17\u77a9\u76ee\u7684CSS\u4ee3\u7801\u4e86\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>.dotting {\n    display: inline-block; min-width: 2px; min-height: 2px;\n    box-shadow: 2px 0 currentColor, 6px 0 currentColor, 10px 0 currentColor; <span style=\"color:green;\">\/* for IE9+, ..., 3\u4e2a\u70b9 *\/<\/span>\n    animation: dot 4s infinite step-start both; <span style=\"color:green;\">\/* for IE10+, ... *\/<\/span>\n    *zoom: expression(this.innerHTML = '...'); <span style=\"color:green;\">\/*  for IE7. \u82e5\u65e0\u9700\u517c\u5bb9IE7, \u6b64\u884c\u5220\u9664 *\/<\/span>\n}\n.dotting:before { content: '...'; } <span style=\"color:green;\">\/* for IE8. \u82e5\u65e0\u9700\u517c\u5bb9IE8, \u6b64\u884c\u4ee5\u53ca\u4e0b\u4e00\u884c\u5220\u9664*\/<\/span>\n.dotting::before { content: ''; } <span style=\"color:green;\">\/* for IE9+ \u8986\u76d6 IE8 *\/<\/span>\n:root .dotting { margin-right: 8px; } <span style=\"color:green;\">\/* for IE9+,FF,CH,OP,SF \u5360\u636e\u7a7a\u95f4*\/<\/span>\n\n@keyframes dot {\n    25% { box-shadow: none; }                                  <span style=\"color:green;\">\/* 0\u4e2a\u70b9 *\/<\/span>\n    50% { box-shadow: 2px 0 currentColor; }                    <span style=\"color:green;\">\/* 1\u4e2a\u70b9 *\/<\/span>\n    75% { box-shadow: 2px 0 currentColor, 6px 0 currentColor;  <span style=\"color:green;\">\/* 2\u4e2a\u70b9 *\/<\/span> }\n}<\/pre>\n<\/div>\n<p>\u4e0a\u9762\u6bcf\u884cCSS\u90fd\u6709\u5176\u5b58\u5728\u7684\u9053\u7406\uff08\u8be6\u89c1\u6ce8\u91ca\uff09\uff0c\u8fd9\u91cc\u6211\u4eec\u53c8\u770b\u5230\u4e86<code>currentColor<\/code>\u8fd9\u4e2a\u5173\u952e\u5b57\uff0cIE9+\u6d4f\u89c8\u5668\u652f\u6301\uff0c\u5176\u53ef\u4ee5\u8ba9CSS\u751f\u6210\u7684\u56fe\u5f62\u7684\u989c\u8272\u8ddf\u6240\u5904\u73af\u5883\u7684<code>color<\/code>\u5c5e\u6027\u503c\u4e00\u6837\uff0c\u4e5f\u5c31\u662f\u8ddf\u6587\u5b57\u989c\u8272\u4e00\u6837\uff0c\u5177\u4f53\u53ef\u53c2\u8003\u6211\u4e0d\u4e45\u524d\u5199\u7684\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/2014\/10\/currentcolor-css3-powerful-css-keyword\/\">currentColor-CSS3\u8d85\u9ad8\u6821\u7ea7\u597d\u7528CSS\u5173\u952e\u5b57<\/a>\u201d\u4e00\u6587\u3002<\/p>\n<p>\u6211\u4eec\u52a8\u753b\u4e00\u4e2a\u5468\u671f<code>4<\/code>\u79d2\u949f\uff0c\u6bcf\u79d2\u5206\u522b\u663e\u793a\u7684\u662f<code>0~3<\/code>\u4e2a\u70b9\uff0c\u4f7f\u7528<code>step-start<\/code>\u8ba9\u52a8\u753b\u4e0d\u8fde\u7eed\uff08<code>animation<\/code>\u6240\u6709\u5173\u952e\u5b57\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=3411\">CSS3 animation\u6e10\u8fdb\u5b9e\u73b0\u70b9\u70b9\u70b9\u7b49\u5f85\u63d0\u793a\u6548\u679c<\/a>\u201d\u8fd9\u7bc7\u6587\u7ae0\u540e\u9762\u6df1\u85cf\u8be6\u7ec6\u4ecb\u7ecd\uff0c\u5982\u6709\u7591\u95ee\uff0c\u53ef\u53c2\u8003\uff09\uff0c\u4e8e\u662f\u5c31\u6709\u4e2a\u7c7b\u4f3cgif\u6253\u70b9\u52a8\u753b\u6548\u679c\uff0c\u76f8\u4fe1\u4e0d\u96be\u7406\u89e3\u3002<\/p>\n<p><strong>3. \u7f8e\u4e2d\u4e0d\u8db3<\/strong><br \/>\n\u867d\u7136\u51e0\u4e4e\u6240\u6709\u6d4f\u89c8\u5668\u90fd\u6709\u6a21\u6709\u6837\uff0c\u4f46\u662f\uff0c\u4ece\u6548\u679c\u4e0a\u8bb2\uff0c\u8fd8\u662f\u6709\u7455\u75b5\u7684\uff0cIE10+\u4ee5\u53caFireFox\u6d4f\u89c8\u5668\u4e0b\u7684\u70b9\u7684\u8fb9\u7f18\u6709\u4e9b\u865a\uff08\u53c2\u89c1\u4e0b\u622a\u56fe\uff09\uff0c\u867d\u7136CSS\u4ee3\u7801\u5e76\u6ca1\u6709\u8bbe\u7f6e\u76d2\u9634\u5f71\u6a21\u7cca\u3002\u8fd9\u79cd\u7fbd\u5316\u73b0\u8c61\u53ef\u4ee5\u8ba9IE\u4ee5\u53caFireFox\u5728\u5927\u6570\u503c\u76d2\u9634\u5f71\u65f6\u5019\u6548\u679c\u66f4\u63a5\u8fd1photoshop\u7684\u9634\u5f71\u6548\u679c\uff1b\u4f46\u662f\uff0c\u5728\u5c0f\u5c3a\u5bf8\u9634\u5f71\u65f6\u5019\uff0c\u5e76\u4e0d\u662f\u6211\u4eec\u60f3\u8981\u7684\u3002<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/2014-12-28_214847.png\" width=\"238\" height=\"112\" alt=\"IE10\u6d4f\u89c8\u5668\u4e0bbox-shadow\u7684\u865a\u5316\" class=\"alignnone\" \/><\/p>\n<p>\u82db\u523b\u7684\u8bbe\u8ba1\u5e08\u3001\u5b8c\u7f8e\u4e3b\u4e49\u7684\u5904\u5973\u5ea7\u663e\u7136\u662f\u4e0d\u80fd\u5bf9\u8fd9\u4e2a\u7f6e\u82e5\u7f54\u95fb\u7684\u3002\u597d\u5728\uff0c\u6211\u53c8\u60f3\u4e86\u53e6\u5916\u4e00\u79cd\u65b9\u6cd5\u5b9e\u73b0<span class=\"dotting2\"><\/span><\/p>\n<h3>\u4e09\u3001\u57fa\u4e8eborder + background\u5b9e\u73b0\u7684\u6253\u70b9\u6548\u679c<span class=\"dotting2\"><\/span><\/h3>\n<p>\u6211\u4eec\u9664\u4e86\u53ef\u4ee5\u4f7f\u7528<code>box-shadow<\/code>\u751f\u6210\u4e09\u4e2a\u70b9\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>border<\/code> + <code>background-color<\/code>\u5b9e\u73b0\u7b49\u5bbd<code>3<\/code>\u70b9\u6548\u679c\uff08\u5982\u672c\u6807\u9898\uff09\u3002<\/p>\n<p>\u60a8\u53ef\u4ee5\u72e0\u72e0\u5730\u70b9\u51fb\u8fd9\u91cc\uff1a<a class=\"a_link\" href=\"http:\/\/www.zhangxinxu.com\/study\/201412\/animation-border-background-dot-dot-dot-wait.html\" target=\"_blank\">animation border+background\u6e10\u8fdb\u5b9e\u73b0\u6253\u70b9\u52a8\u753bdemo<\/a><\/p>\n<p><strong>1. \u6e10\u8fdb\u517c\u5bb9<\/strong><br \/>\n\u5404\u4e2a\u6d4f\u89c8\u5668\u4e0b\u7684\u6548\u679c\u5206\u522b\u5982\u4e0b\u8868\uff08\u4e3b\u8981\u5173\u6ce8IE10+\u4ee5\u53caFF\u4e0b\u6548\u679c\uff09\uff1a<\/p>\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" class=\"params_table\">\n<tr>\n<th scope=\"col\">IE7<\/th>\n<th scope=\"col\">IE8<\/th>\n<th scope=\"col\">IE9<\/th>\n<th scope=\"col\">IE10\/IE11(gif)<\/th>\n<th scope=\"col\">Chrome(gif)<\/th>\n<th scope=\"col\">FireFox(gif)<\/th>\n<\/tr>\n<tr align=\"center\">\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/2014-12-28_202701.png\" width=\"263\" height=\"203\" alt=\"IE7\u622a\u56fe\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/2014-12-28_203435.png\" width=\"219\" height=\"151\" alt=\"IE8\u622a\u56fe\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/2014-12-28_223232.png\" width=\"183\" height=\"121\" alt=\"IE9\u622a\u56fe\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/dotting-box-shadow-ie11.gif\" width=\"119\" height=\"31\" alt=\"IE10\/IE11 git\u52a8\u753b\u6548\u679c\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/dotting-box-shadow-chrome.gif\" width=\"120\" height=\"31\" alt=\"Chrome\u6d4f\u89c8\u5668gif\u52a8\u753b\u6548\u679c\"><\/td>\n<td><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/image.zhangxinxu.com\/image\/blog\/201412\/dotting-box-shadow-firefox2.gif\" width=\"124\" height=\"31\" alt=\"FireFox\u6d4f\u89c8\u5668\u4e0b\u52a8\u753b\u6548\u679c\"><\/td>\n<\/tr>\n<\/table>\n<p>\u5b9a\u775b\u4e00\u770b\uff0c\u4f1a\u53d1\u73b0IE9\u4ee5\u53caIE10+\u4ee5\u53caFireFox\u7684\u70b9\u518d\u4e5f\u4e0d\u662f\u6a21\u7cca\u7684\uff0c\u800c\u662f\u6e05\u6e05\u695a\u695a\u7684\u5c0f\u65b9\u70b9\uff01<\/p>\n<p><strong>2. \u5b9e\u73b0\u539f\u7406<\/strong><br \/>\nHTML\u8fd8\u662f\u90a3\u4e2aHTML\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>\u8ba2\u5355\u63d0\u4ea4\u4e2d<span style=\"color:#cd0000;\">&lt;span class=\"dotting\">&lt;\/span><\/span><\/pre>\n<\/div>\n<p>CSS\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<div class=\"zxx_code\">\n<pre>.dotting {\n    display: inline-block; width: 10px; min-height: 2px;\n    padding-right: 2px;\n    border-left: 2px solid currentColor; border-right: 2px solid currentColor;   \n    background-color: currentColor; background-clip: content-box;\n    box-sizing: border-box;\n    animation: dot 4s infinite step-start both;\n    *zoom: expression(this.innerHTML = '...'); <span style=\"color:green;\">\/* IE7 *\/<\/span>\n}\n.dotting:before { content: '...'; } <span style=\"color:green;\">\/* IE8 *\/<\/span>\n.dotting::before { content: ''; }\n:root .dotting { margin-left: 2px; padding-left: 2px; } <span style=\"color:green;\">\/* IE9+ *\/<\/span>\n\n@keyframes dot {\n    25% { border-color: transparent; background-color: transparent; }          <span style=\"color:green;\">\/* 0\u4e2a\u70b9 *\/<\/span>\n    50% { border-right-color: transparent; background-color: transparent; }    <span style=\"color:green;\">\/* 1\u4e2a\u70b9 *\/<\/span>\n    75% { border-right-color: transparent; }                                   <span style=\"color:green;\">\/* 2\u4e2a\u70b9 *\/<\/span>\n}<\/pre>\n<\/div>\n<p><strong>\u4e00\u4e9b\u8bf4\u660e\uff1a<\/strong><\/p>\n<ol>\n<li>\u540c\u6837\u662f4\u79d2\u52a8\u753b\uff0c\u6bcf\u79d2\u949f\u663e\u793a1\u4e2a\u70b9\uff1b<\/li>\n<li>IE7\/IE8\u5b9e\u73b0\u539f\u7406\u8ddf\u4e0a\u9762<code>box-shadow<\/code>\u65b9\u6cd5\u4e00\u81f4\uff0c\u90fd\u662f\u5185\u5bb9\u751f\u6210\uff0c\u5982\u679c\u65e0\u9700\u517c\u5bb9IE7\/IE8, \u53ef\u4ee5\u6309\u7167\u7b2c\u4e00\u4e2a\u4f8b\u5b50CSS\u4ee3\u7801\u6ce8\u91ca\u8bf4\u660e\u5220\u9664\u4e00\u4e9bCSS\uff1b<\/li>\n<li><code>currentColor<\/code>\u5173\u952e\u5b57\u53ef\u4ee5\u8ba9\u56fe\u5f62\u5b57\u7b26\u5316\uff0c\u5fc5\u4e0d\u53ef\u5c11\uff1b<\/li>\n<li>\u6700\u5927\u529f\u81e3\u662fCSS3 <code>background-clip<\/code>\u5c5e\u6027\uff0c\u53ef\u4ee5\u8ba9IE9+\u6d4f\u89c8\u5668\u4e0b\u5de6\u53f3<code>padding<\/code>\u6ca1\u6709\u80cc\u666f\u8272\uff0c\u4e8e\u662f\u5f62\u6210\u4e86\u7b49\u5206\u6253\u70b9\u6548\u679c\u3002CSS3 Background\u535a\u5927\u7cbe\u6df1\uff0c\u6709\u5174\u8da3\u53ef\u53c2\u8003\u4e00\u7bc7\u5f88\u8d5e\u7684\u6587\u7ae0\u201c<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=1618\">CSS3 Backgrounds\u76f8\u5173\u4ecb\u7ecd<\/a>\u201d\uff0c\u5f88\u591a\u56fe\uff0c\u79fb\u52a8\u7aef\u975ewifi\u614e\u70b9\uff1b<\/li>\n<li><code>box-sizing<\/code>\u662f\u8ba9\u73b0\u4ee3\u6d4f\u89c8\u5668\u548cIE7\/IE8\u5360\u636e\u5bbd\u5ea6\u5b8c\u5168\u4e00\u6837\u7684\u529f\u81e3\uff1aIE7\/IE8\u5b9e\u9645\u5bbd\u5ea6\u662f<code>width+padding-right<\/code>\u4e3a<code>12<\/code>\u50cf\u7d20\uff0c\u5176\u4ed6\u73b0\u4ee3\u6d4f\u89c8\u5668\u4e3a<code>width+margin-left<\/code>\u4e5f\u662f<code>12<\/code>\u50cf\u7d20\uff1b<\/li>\n<li>\u8fd9\u91ccCSS\u4ee3\u7801\u4e3b\u8981\u7528\u6765\u5c55\u793a\u539f\u7406\uff0c\u6545\u6ca1\u6709\u663e\u793a<code>-webkit-animation<\/code>\u4ee5\u53ca<code>@-webkit-keyframes<\/code>\u79c1\u6709\u524d\u7f00\uff0c\u5b9e\u9645\u76ee\u524d\u8fd8\u662f\u9700\u8981\u7684\uff1b<\/li>\n<\/ol>\n<p><strong>3. \u4f18\u52bf\u6240\u5728<\/strong><\/p>\n<ol>\n<li>CSS\u751f\u6210\u7684\u70b9\u6ca1\u6709\u865a\u5316\uff0c\u6548\u679c\u66f4\u597d\uff1b<\/li>\n<li>\u5360\u636e\u7684\u5c3a\u5bf8\u5404\u4e2a\u6d4f\u89c8\u5668\u5b8c\u5168\u4e00\u81f4\uff0c\u90fd\u662f<code>12<\/code>\u50cf\u7d20\u5bbd\u5ea6\uff1b<\/li>\n<li>\u989c\u8272\u7ee7\u627f\uff1b<\/li>\n<li>\u5929\u7136\u5b57\u7b26\u5316\u663e\u793a\uff0c\u4e0e\u6587\u5b57\u6d51\u7136\u5929\u6210\uff1b<\/li>\n<\/ol>\n<h3>\u56db\u3001\u7ed3\u675f\u8bed<span class=\"dotting2\"><\/span><\/h3>\n<p>\u540c\u5fd7\u4eec\uff0c\u53bb\u770b\u770b\u4f60\u7684\u7f51\u7ad9\uff0c\u5982\u679c\u53d1\u73b0\u6709\u300c\u6b63\u5728\u52a0\u8f7d\u4e2d&#8230;\u300d\u8fd9\u6837\u7684\u63d0\u793a\u65f6\u5019\uff0c\u5c31\u53ef\u4ee5\u628a\u5176\u4e2d\u7684\u70b9\u70b9\u70b9<code>...<\/code>\u653e\u5fc3\u5927\u80c6\u5730\u6362\u6210<code>&lt;span class=\"dotting\">&lt;\/span><\/code>\u4e86\u3002\u4e0d\u652f\u6301<code>animation<\/code>\u7684\u6d4f\u89c8\u5668\u8fd8\u662f\u90a3\u4e2a\u5b57\u7b26\uff1b\u652f\u6301\u7684\u6d4f\u89c8\u5668\u4f1a\u6e10\u8fdb\u589e\u5f3a\u52a8\u753b\u663e\u793a\uff0c\u53ea\u6709\u597d\u5904\uff0c\u6ca1\u6709\u574f\u5904\uff0c\u9002\u5408\u4e8e\u5404\u79cd\u573a\u666f\uff0c\u4f55\u4e50\u4e0d\u4e3a\u5462\uff01\uff01<img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/4.gif\" align=\"absmiddle\"><\/p>\n<p>\u6280\u672f\u65e0\u6b62\u5883\uff0c\u6211\u76ee\u524d\u63d0\u4f9b\u7684\u65b9\u6848\uff0c\u4e0d\u4e00\u5b9a\u662f\u6700\u597d\u7684\u65b9\u6cd5\uff0c\u629b\u7816\u5f15\u7389\uff0c\u5982\u679c\u4f60\u6709\u66f4\u597d\u7684\u5b9e\u73b0idea, \u6b22\u8fce\u5206\u4eab\uff0c\u4e5f\u6b22\u8fce\u53cd\u9988\u4f7f\u7528\u95ee\u9898\u3002<\/p>\n<p><strong>\u66f4\u65b0\u4e8e2016\u5e747\u67089\u65e5<\/strong><br \/>\n\u540e\u6765\u6211\u771f\u7684\u53d1\u73b0\u4e86\u66f4\u597d\u7684\u65b9\u6cd5\uff0c\u5c31\u662f\u4f7f\u7528<code>text-shadow<\/code>\uff0c\u5df2\u7533\u8bf7\u4e13\u5229\uff0c\u4e0d\u8be6\u8ff0\u3002<\/p>\n<p>\u7136\u540e\uff0c\u4eca\u5929\uff0c\u53c8\u53d1\u73b0\u4e86\u66f4\u597d\u7684\u65b9\u6cd5\uff0c\u501f\u52a9CSS3 ch\u5355\u4f4d\u3002\u8be6\u7ec6\u53c2\u89c1<a href=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=5503\">\u8fd9\u7bc7\u6587\u7ae0<\/a>\u3002<\/p>\n<p>\u611f\u8c22\u9605\u8bfb\uff0c\u65b0\u5e74\u5feb\u4e50\uff01<img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/14.gif\" align=\"absmiddle\"><\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u5305\u542b\u6837\u5f0f\u884c\u4e3a\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=\"http:\/\/www.zhangxinxu.com\/wordpress\/?p=4519\">http:\/\/www.zhangxinxu.com\/wordpress\/?p=4519<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4ee5\u524d\u4ecb\u7ecd\u8fc7\u4e00\u79cd\u65b9\u6cd5\u5b9e\u73b0\u6253\u70b9loading\u52a8\u753b\u6548\u679c\uff0c\u4f46\u662f\u90a3\u4e2a\u65b9\u6cd5\u4e0d\u5065\u58ee\uff0c\u673a\u7f18\u5de7\u5408\uff0c\u8ba9\u6211\u91cd\u65b0\u601d\u8003\u6709\u6ca1\u6709\u66f4\u597d\u7684\u65b9\u6cd5\u3002\u800c\u672c\u6587\u5206\u4eab\u7684\u5c31\u662f\u81ea\u5df1\u60f3\u5230\u4e862\u4e2a\u5168\u65b0\u7684\u5b9e\u73b0\u65b9\u6cd5\uff0c\u517c\u5bb9\u5404\u5927\u5c0f\u6d4f\u89c8\u5668\u3002<\/p>\n<p>\u672c\u6587\u4e0d\u4ec5\u6709demo\uff0c\u6e90\u4ee3\u7801\u5c55\u793a\uff0c\u8fd8\u7279\u610f\u5236\u4f5c\u4e86\u591a\u79cdgif\u6548\u679c\u6f14\u793a\u5e2e\u52a9\u7406\u89e3\uff0c\u76f8\u4fe1\u672c\u6587\u7684\u5185\u5bb9\u4f1a\u5bf9\u4f60\u7684\u5de5\u4f5c\u6709\u6240\u5e2e\u52a9\u7684\uff01<img decoding=\"async\" src=\"http:\/\/mat1.gtimg.com\/www\/mb\/images\/face\/14.gif\" align=\"absmiddle\"><\/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":[531,598,360,934,168,968,204,967,966],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/4519"}],"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=4519"}],"version-history":[{"count":0,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/4519\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=4519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=4519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=4519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}