iconfont.js 3.3 KB

1
  1. (function(window){var svgSprite='<svg><symbol id="icon-xuan" viewBox="0 0 1024 1024"><path d="M527.519973 877.43083c-51.583842 0-101.629655-10.105149-148.749836-30.036084-45.50745-19.24839-86.37216-46.798862-121.464399-81.891102s-62.644759-75.958996-81.892125-121.465422c-19.930935-47.120181-30.036084-97.167017-30.036084-148.750859 0-51.584865 10.105149-101.630678 30.036084-148.750859 19.249413-45.506427 46.799886-86.373183 81.892125-121.465422 35.092239-35.092239 75.958996-62.644759 121.464399-81.892125 47.120181-19.929912 97.165993-30.03506 148.749836-30.03506 51.584865 0 101.631702 10.105149 148.750859 30.03506 45.50745 19.24839 86.373183 46.799886 121.465422 81.892125 35.092239 35.092239 62.644759 75.958996 81.891102 121.466446 19.930935 47.119157 30.036084 97.16497 30.036084 148.749836 0 51.583842-10.105149 101.630678-30.036084 148.750859-19.24839 45.506427-46.798862 86.373183-81.891102 121.465422s-75.958996 62.644759-121.465422 81.891102C629.151675 867.325681 579.104839 877.43083 527.519973 877.43083zM527.519973 133.608997c-199.430098 0-361.676319 162.248268-361.676319 361.677343s162.248268 361.677343 361.676319 361.677343 361.677343-162.249291 361.677343-361.677343S726.949049 133.608997 527.519973 133.608997z" ></path><path d="M477.703381 646.49825c-2.38328 0-4.773723-0.827855-6.709819-2.509147L313.172117 506.817977c-4.26514-3.707438-4.717442-10.17064-1.010003-14.436804 3.706415-4.26514 10.169617-4.718465 14.435781-1.010003l150.276608 130.612757 219.675188-241.142106c3.805676-4.177136 10.278087-4.479011 14.456247-0.673335s4.479011 10.278087 0.673335 14.456247L485.271754 643.157155C483.255841 645.370567 480.485751 646.49825 477.703381 646.49825z" ></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)