123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704 |
-
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <title>IconFont</title>
- <link rel="stylesheet" href="demo.css">
- <script src="iconfont.js"></script>
-
- <style type="text/css">
- .icon {
- /* 通过设置 font-size 来改变图标大小 */
- width: 1em; height: 1em;
- /* 图标和文字相邻时,垂直对齐 */
- vertical-align: -0.15em;
- /* 通过设置 color 来改变 SVG 的颜色/fill */
- fill: currentColor;
- /* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
- normalize.css 中也包含这行 */
- overflow: hidden;
- }
-
- </style>
- </head>
- <body>
- <div class="main markdown">
- <h1>IconFont 图标</h1>
- <ul class="icon_lists clear">
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-wsmp-payuser"></use>
- </svg>
- <div class="name">会员</div>
- <div class="fontclass">#icon-wsmp-payuser</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-jiankangshuidi"></use>
- </svg>
- <div class="name">健康 水滴</div>
- <div class="fontclass">#icon-jiankangshuidi</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-iconbaocuo"></use>
- </svg>
- <div class="name">报错</div>
- <div class="fontclass">#icon-iconbaocuo</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-morentouxiang"></use>
- </svg>
- <div class="name">225默认头像</div>
- <div class="fontclass">#icon-morentouxiang</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-accessory"></use>
- </svg>
- <div class="name">accessory</div>
- <div class="fontclass">#icon-accessory</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-add"></use>
- </svg>
- <div class="name">add</div>
- <div class="fontclass">#icon-add</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-addition_fill"></use>
- </svg>
- <div class="name">addition_fill</div>
- <div class="fontclass">#icon-addition_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-addition"></use>
- </svg>
- <div class="name">addition</div>
- <div class="fontclass">#icon-addition</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-addressbook_fill"></use>
- </svg>
- <div class="name">addressbook_fill</div>
- <div class="fontclass">#icon-addressbook_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-addressbook"></use>
- </svg>
- <div class="name">addressbook</div>
- <div class="fontclass">#icon-addressbook</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-browse_fill"></use>
- </svg>
- <div class="name">browse_fill</div>
- <div class="fontclass">#icon-browse_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-brush"></use>
- </svg>
- <div class="name">brush</div>
- <div class="fontclass">#icon-brush</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-brush_fill"></use>
- </svg>
- <div class="name">brush_fill</div>
- <div class="fontclass">#icon-brush_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-computer_fill"></use>
- </svg>
- <div class="name">computer_fill</div>
- <div class="fontclass">#icon-computer_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-computer"></use>
- </svg>
- <div class="name">computer</div>
- <div class="fontclass">#icon-computer</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-coordinates_fill"></use>
- </svg>
- <div class="name">coordinates_fill</div>
- <div class="fontclass">#icon-coordinates_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-coordinates"></use>
- </svg>
- <div class="name">coordinates</div>
- <div class="fontclass">#icon-coordinates</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-coupons_fill"></use>
- </svg>
- <div class="name">coupons_fill</div>
- <div class="fontclass">#icon-coupons_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-customerservice_fill"></use>
- </svg>
- <div class="name">customerservice_fill</div>
- <div class="fontclass">#icon-customerservice_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-customerservice"></use>
- </svg>
- <div class="name">customerservice</div>
- <div class="fontclass">#icon-customerservice</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-document"></use>
- </svg>
- <div class="name">document</div>
- <div class="fontclass">#icon-document</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-document_fill"></use>
- </svg>
- <div class="name">document_fill</div>
- <div class="fontclass">#icon-document_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-dynamic_fill"></use>
- </svg>
- <div class="name">dynamic_fill</div>
- <div class="fontclass">#icon-dynamic_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-editor"></use>
- </svg>
- <div class="name">editor</div>
- <div class="fontclass">#icon-editor</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-emoji"></use>
- </svg>
- <div class="name">emoji</div>
- <div class="fontclass">#icon-emoji</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-enter"></use>
- </svg>
- <div class="name">enter</div>
- <div class="fontclass">#icon-enter</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-flag_fill"></use>
- </svg>
- <div class="name">flag_fill</div>
- <div class="fontclass">#icon-flag_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-flag"></use>
- </svg>
- <div class="name">flag</div>
- <div class="fontclass">#icon-flag</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-group_fill"></use>
- </svg>
- <div class="name">group_fill</div>
- <div class="fontclass">#icon-group_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-headlines_fill"></use>
- </svg>
- <div class="name">headlines_fill</div>
- <div class="fontclass">#icon-headlines_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-homepage_fill"></use>
- </svg>
- <div class="name">homepage_fill</div>
- <div class="fontclass">#icon-homepage_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-homepage"></use>
- </svg>
- <div class="name">homepage</div>
- <div class="fontclass">#icon-homepage</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-interactive_fill"></use>
- </svg>
- <div class="name">interactive_fill</div>
- <div class="fontclass">#icon-interactive_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-interactive"></use>
- </svg>
- <div class="name">interactive</div>
- <div class="fontclass">#icon-interactive</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-label"></use>
- </svg>
- <div class="name">label</div>
- <div class="fontclass">#icon-label</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-like_fill"></use>
- </svg>
- <div class="name">like_fill</div>
- <div class="fontclass">#icon-like_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-like"></use>
- </svg>
- <div class="name">like</div>
- <div class="fontclass">#icon-like</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-lock"></use>
- </svg>
- <div class="name">lock</div>
- <div class="fontclass">#icon-lock</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-mail"></use>
- </svg>
- <div class="name">mail</div>
- <div class="fontclass">#icon-mail</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-manage"></use>
- </svg>
- <div class="name">manage</div>
- <div class="fontclass">#icon-manage</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-message"></use>
- </svg>
- <div class="name">message</div>
- <div class="fontclass">#icon-message</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-mine_fill"></use>
- </svg>
- <div class="name">mine_fill</div>
- <div class="fontclass">#icon-mine_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-mobilephone_fill"></use>
- </svg>
- <div class="name">mobilephone_fill</div>
- <div class="fontclass">#icon-mobilephone_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-mobilephone"></use>
- </svg>
- <div class="name">mobilephone</div>
- <div class="fontclass">#icon-mobilephone</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-offline_fill"></use>
- </svg>
- <div class="name">offline_fill</div>
- <div class="fontclass">#icon-offline_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-offline"></use>
- </svg>
- <div class="name">offline</div>
- <div class="fontclass">#icon-offline</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-order_fill"></use>
- </svg>
- <div class="name">order_fill</div>
- <div class="fontclass">#icon-order_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-other"></use>
- </svg>
- <div class="name">other</div>
- <div class="fontclass">#icon-other</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-picture_fill"></use>
- </svg>
- <div class="name">picture_fill</div>
- <div class="fontclass">#icon-picture_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-prompt_fill"></use>
- </svg>
- <div class="name">prompt_fill</div>
- <div class="fontclass">#icon-prompt_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-qrcode_fill"></use>
- </svg>
- <div class="name">qrcode_fill</div>
- <div class="fontclass">#icon-qrcode_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-remind_fill"></use>
- </svg>
- <div class="name">remind_fill</div>
- <div class="fontclass">#icon-remind_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-remind"></use>
- </svg>
- <div class="name">remind</div>
- <div class="fontclass">#icon-remind</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-return"></use>
- </svg>
- <div class="name">return</div>
- <div class="fontclass">#icon-return</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-service_fill"></use>
- </svg>
- <div class="name">service_fill</div>
- <div class="fontclass">#icon-service_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-service"></use>
- </svg>
- <div class="name">service</div>
- <div class="fontclass">#icon-service</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-setup_fill"></use>
- </svg>
- <div class="name">setup_fill</div>
- <div class="fontclass">#icon-setup_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-setup"></use>
- </svg>
- <div class="name">setup</div>
- <div class="fontclass">#icon-setup</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-smallscreen"></use>
- </svg>
- <div class="name">smallscreen</div>
- <div class="fontclass">#icon-smallscreen</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-success_fill"></use>
- </svg>
- <div class="name">success_fill</div>
- <div class="fontclass">#icon-success_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-success"></use>
- </svg>
- <div class="name">success</div>
- <div class="fontclass">#icon-success</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-time_fill"></use>
- </svg>
- <div class="name">time_fill</div>
- <div class="fontclass">#icon-time_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-trash"></use>
- </svg>
- <div class="name">trash</div>
- <div class="fontclass">#icon-trash</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-trash_fill"></use>
- </svg>
- <div class="name">trash_fill</div>
- <div class="fontclass">#icon-trash_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-undo"></use>
- </svg>
- <div class="name">undo</div>
- <div class="fontclass">#icon-undo</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-workbench_fill"></use>
- </svg>
- <div class="name">workbench_fill</div>
- <div class="fontclass">#icon-workbench_fill</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-daoru"></use>
- </svg>
- <div class="name">导入</div>
- <div class="fontclass">#icon-daoru</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-search"></use>
- </svg>
- <div class="name">search</div>
- <div class="fontclass">#icon-search</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-packup"></use>
- </svg>
- <div class="name">packup</div>
- <div class="fontclass">#icon-packup</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-unfold"></use>
- </svg>
- <div class="name">unfold</div>
- <div class="fontclass">#icon-unfold</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-wangwang"></use>
- </svg>
- <div class="name">wangwang_fill</div>
- <div class="fontclass">#icon-wangwang</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-yanzhengma"></use>
- </svg>
- <div class="name">验证码</div>
- <div class="fontclass">#icon-yanzhengma</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-baocuo-chahua"></use>
- </svg>
- <div class="name">报错-插画</div>
- <div class="fontclass">#icon-baocuo-chahua</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-pengyou"></use>
- </svg>
- <div class="name">朋友</div>
- <div class="fontclass">#icon-pengyou</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-suoyou"></use>
- </svg>
- <div class="name">所有</div>
- <div class="fontclass">#icon-suoyou</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-huiyuan"></use>
- </svg>
- <div class="name">会员</div>
- <div class="fontclass">#icon-huiyuan</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-huiyuan1"></use>
- </svg>
- <div class="name">会员</div>
- <div class="fontclass">#icon-huiyuan1</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-kongyemian"></use>
- </svg>
- <div class="name">空页面</div>
- <div class="fontclass">#icon-kongyemian</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-logout"></use>
- </svg>
- <div class="name">logout</div>
- <div class="fontclass">#icon-logout</div>
- </li>
-
- <li>
- <svg class="icon" aria-hidden="true">
- <use xlink:href="#icon-cloudupload-o"></use>
- </svg>
- <div class="name">cloud upload-o</div>
- <div class="fontclass">#icon-cloudupload-o</div>
- </li>
-
- </ul>
-
-
- <h2 id="symbol-">symbol引用</h2>
- <hr>
-
- <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
- 这种用法其实是做了一个svg的集合,与另外两种相比具有如下特点:</p>
- <ul>
- <li>支持多色图标了,不再受单色限制。</li>
- <li>通过一些技巧,支持像字体那样,通过<code>font-size</code>,<code>color</code>来调整样式。</li>
- <li>兼容性较差,支持 ie9+,及现代浏览器。</li>
- <li>浏览器渲染svg的性能一般,还不如png。</li>
- </ul>
- <p>使用步骤如下:</p>
- <h3 id="-symbol-">第一步:引入项目下面生成的symbol代码:</h3>
- <pre><code class="lang-js hljs javascript"><span class="hljs-comment"><script src="./iconfont.js"></script></span></code></pre>
- <h3 id="-css-">第二步:加入通用css代码(引入一次就行):</h3>
- <pre><code class="lang-js hljs javascript"><style type=<span class="hljs-string">"text/css"</span>>
- .icon {
- width: <span class="hljs-number">1</span>em; height: <span class="hljs-number">1</span>em;
- vertical-align: <span class="hljs-number">-0.15</span>em;
- fill: currentColor;
- overflow: hidden;
- }
- <<span class="hljs-regexp">/style></span></code></pre>
- <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
- <pre><code class="lang-js hljs javascript"><svg <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"icon"</span> aria-hidden=<span class="hljs-string">"true"</span>><span class="xml"><span class="hljs-tag">
- <<span class="hljs-name">use</span> <span class="hljs-attr">xlink:href</span>=<span class="hljs-string">"#icon-xxx"</span>></span><span class="hljs-tag"></<span class="hljs-name">use</span>></span>
- </span><<span class="hljs-regexp">/svg>
- </span></code></pre>
- </div>
- </body>
- </html>
|