iconfont.js 3.3 KB

1
  1. (function(window){var svgSprite='<svg><symbol id="icon-xuanzhong" viewBox="0 0 1024 1024"><path d="M512 12C235.858 12 12 235.858 12 512s223.858 500 500 500 500-223.858 500-500S788.142 12 512 12zM785.818 367.546 455.656 697.71c-1.098 1.582-1.766 3.366-3.172 4.776-6.568 6.564-15.22 9.592-23.822 9.376-8.598 0.214-17.254-2.814-23.816-9.378-1.406-1.408-2.068-3.19-3.162-4.77l-163.504-163.504c-12.714-12.708-12.714-33.32 0-46.032 12.71-12.71 33.322-12.71 46.034 0l144.452 144.452 311.12-311.118c12.71-12.714 33.318-12.714 46.032 0C798.53 334.224 798.53 354.834 785.818 367.546z" ></path></symbol><symbol id="icon-jiantou2" viewBox="0 0 1024 1024"><path d="M510.80529 953.690678c-244.532319 0-443.568445-199.037149-443.568445-443.568445 0-244.534366 198.971657-443.568445 443.568445-443.568445 244.660232 0 443.567421 199.034079 443.567421 443.568445C954.372711 754.653529 755.465522 953.690678 510.80529 953.690678zM510.80529 125.674281c-212.151841 0-384.827599 172.485423-384.827599 384.447952 0 211.960483 172.674735 384.382461 384.827599 384.382461 212.215286 0 384.890021-172.4844 384.890021-384.382461C895.696334 298.15868 723.084021 125.674281 510.80529 125.674281zM430.265976 754.400772c-5.703909 0-11.342326-2.090615-15.651468-6.526647-8.617261-8.617261-8.617261-22.557762 0-31.302937l205.245548-206.449979-205.118658-206.513424c-8.616238-8.618285-8.616238-22.62223 0-31.429827 8.617261-8.617261 22.558785-8.617261 31.17707 0l236.167814 237.94325-236.294704 237.816361C441.608302 752.310158 435.968861 754.400772 430.265976 754.400772z" ></path></symbol><symbol id="icon-unselected" viewBox="0 0 1024 1024"><path d="M512 64a448 448 0 1 1-448 448 448 448 0 0 1 448-448m0-64a512 512 0 1 0 512 512 512 512 0 0 0-512-512z" ></path></symbol></svg>';var script=function(){var scripts=document.getElementsByTagName("script");return scripts[scripts.length-1]}();var shouldInjectCss=script.getAttribute("data-injectcss");var ready=function(fn){if(document.addEventListener){if(~["complete","loaded","interactive"].indexOf(document.readyState)){setTimeout(fn,0)}else{var loadFn=function(){document.removeEventListener("DOMContentLoaded",loadFn,false);fn()};document.addEventListener("DOMContentLoaded",loadFn,false)}}else if(document.attachEvent){IEContentLoaded(window,fn)}function IEContentLoaded(w,fn){var d=w.document,done=false,init=function(){if(!done){done=true;fn()}};var polling=function(){try{d.documentElement.doScroll("left")}catch(e){setTimeout(polling,50);return}init()};polling();d.onreadystatechange=function(){if(d.readyState=="complete"){d.onreadystatechange=null;init()}}}};var before=function(el,target){target.parentNode.insertBefore(el,target)};var prepend=function(el,target){if(target.firstChild){before(el,target.firstChild)}else{target.appendChild(el)}};function appendSvg(){var div,svg;div=document.createElement("div");div.innerHTML=svgSprite;svgSprite=null;svg=div.getElementsByTagName("svg")[0];if(svg){svg.setAttribute("aria-hidden","true");svg.style.position="absolute";svg.style.width=0;svg.style.height=0;svg.style.overflow="hidden";prepend(svg,document.body)}}if(shouldInjectCss&&!window.__iconfont__svg__cssinject__){window.__iconfont__svg__cssinject__=true;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(e){console&&console.log(e)}}ready(appendSvg)})(window)