sakura/css/iconfont/demo_unicode.html
MomentQYC 3c0161eb5f
初次资源提交 (#296)
* First Commit

* Update README.md

* Delete botui.js

* Delete img/svg/mine directory

* Delete animation404.js

* Delete mastodon-about.js

* Delete js/highlight directory

* Create relay

* Add files via upload

* Delete other-sites/me directory

* Delete relay

* Delete js/pure-js-lib directory

* Update static

* 'Update'

* 'Update'

* Update

* Update
2022-07-05 17:33:39 +08:00

451 lines
17 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>IconFont</title>
<link rel="stylesheet" href="demo.css">
<style type="text/css">
@font-face {font-family: "iconfont";
src: url('iconfont.eot'); /* IE9*/
src: url('iconfont.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('iconfont.woff') format('woff'), /* chrome, firefox */
url('iconfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family:"iconfont" !important;
font-size:16px;
font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;
}
</style>
</head>
<body>
<div class="main markdown">
<h1>IconFont 图标</h1>
<ul class="icon_lists clear">
<li>
<i class="icon iconfont">&#xe65d;</i>
<div class="name">cat</div>
<div class="code">&amp;#xe65d;</div>
</li>
<li>
<i class="icon iconfont">&#xe65e;</i>
<div class="name">cat-in-white-silhoue</div>
<div class="code">&amp;#xe65e;</div>
</li>
<li>
<i class="icon iconfont">&#xe664;</i>
<div class="name">markdown</div>
<div class="code">&amp;#xe664;</div>
</li>
<li>
<i class="icon iconfont">&#xe67e;</i>
<div class="name">uniE6A3</div>
<div class="code">&amp;#xe67e;</div>
</li>
<li>
<i class="icon iconfont">&#xe67f;</i>
<div class="name">uniE6A0</div>
<div class="code">&amp;#xe67f;</div>
</li>
<li>
<i class="icon iconfont">&#xe680;</i>
<div class="name">uniE6B4</div>
<div class="code">&amp;#xe680;</div>
</li>
<li>
<i class="icon iconfont">&#xe681;</i>
<div class="name">uniE6BC</div>
<div class="code">&amp;#xe681;</div>
</li>
<li>
<i class="icon iconfont">&#xe682;</i>
<div class="name">uniE6BF</div>
<div class="code">&amp;#xe682;</div>
</li>
<li>
<i class="icon iconfont">&#xe683;</i>
<div class="name">uniE6C4</div>
<div class="code">&amp;#xe683;</div>
</li>
<li>
<i class="icon iconfont">&#xe684;</i>
<div class="name">uniE6E5</div>
<div class="code">&amp;#xe684;</div>
</li>
<li>
<i class="icon iconfont">&#xe685;</i>
<div class="name">uniE6EB</div>
<div class="code">&amp;#xe685;</div>
</li>
<li>
<i class="icon iconfont">&#xe686;</i>
<div class="name">uniE6F3</div>
<div class="code">&amp;#xe686;</div>
</li>
<li>
<i class="icon iconfont">&#xe687;</i>
<div class="name">uniE6DE</div>
<div class="code">&amp;#xe687;</div>
</li>
<li>
<i class="icon iconfont">&#xe688;</i>
<div class="name">uniE64B</div>
<div class="code">&amp;#xe688;</div>
</li>
<li>
<i class="icon iconfont">&#xe689;</i>
<div class="name">uniE65F</div>
<div class="code">&amp;#xe689;</div>
</li>
<li>
<i class="icon iconfont">&#xe68a;</i>
<div class="name">uniE64C</div>
<div class="code">&amp;#xe68a;</div>
</li>
<li>
<i class="icon iconfont">&#xe68b;</i>
<div class="name">uniE66F</div>
<div class="code">&amp;#xe68b;</div>
</li>
<li>
<i class="icon iconfont">&#xe68c;</i>
<div class="name">uniE66C</div>
<div class="code">&amp;#xe68c;</div>
</li>
<li>
<i class="icon iconfont">&#xe68d;</i>
<div class="name">uniE66B</div>
<div class="code">&amp;#xe68d;</div>
</li>
<li>
<i class="icon iconfont">&#xe68e;</i>
<div class="name">uniE68C</div>
<div class="code">&amp;#xe68e;</div>
</li>
<li>
<i class="icon iconfont">&#xe68f;</i>
<div class="name">uniE69F</div>
<div class="code">&amp;#xe68f;</div>
</li>
<li>
<i class="icon iconfont">&#xe690;</i>
<div class="name">uniE65C</div>
<div class="code">&amp;#xe690;</div>
</li>
<li>
<i class="icon iconfont">&#xe691;</i>
<div class="name">uniE71F</div>
<div class="code">&amp;#xe691;</div>
</li>
<li>
<i class="icon iconfont">&#xe692;</i>
<div class="name">uniE70A</div>
<div class="code">&amp;#xe692;</div>
</li>
<li>
<i class="icon iconfont">&#xe693;</i>
<div class="name">uniE73D</div>
<div class="code">&amp;#xe693;</div>
</li>
<li>
<i class="icon iconfont">&#xe694;</i>
<div class="name">uniE75C</div>
<div class="code">&amp;#xe694;</div>
</li>
<li>
<i class="icon iconfont">&#xe695;</i>
<div class="name">uniE75D</div>
<div class="code">&amp;#xe695;</div>
</li>
<li>
<i class="icon iconfont">&#xe696;</i>
<div class="name">uniE607</div>
<div class="code">&amp;#xe696;</div>
</li>
<li>
<i class="icon iconfont">&#xe697;</i>
<div class="name">uniE604</div>
<div class="code">&amp;#xe697;</div>
</li>
<li>
<i class="icon iconfont">&#xe698;</i>
<div class="name">uniE628</div>
<div class="code">&amp;#xe698;</div>
</li>
<li>
<i class="icon iconfont">&#xe699;</i>
<div class="name">uniE6E3</div>
<div class="code">&amp;#xe699;</div>
</li>
<li>
<i class="icon iconfont">&#xe69a;</i>
<div class="name">uniE644</div>
<div class="code">&amp;#xe69a;</div>
</li>
<li>
<i class="icon iconfont">&#xe69b;</i>
<div class="name">uniE646</div>
<div class="code">&amp;#xe69b;</div>
</li>
<li>
<i class="icon iconfont">&#xe69c;</i>
<div class="name">uniE74A</div>
<div class="code">&amp;#xe69c;</div>
</li>
<li>
<i class="icon iconfont">&#xe69d;</i>
<div class="name">uniE651</div>
<div class="code">&amp;#xe69d;</div>
</li>
<li>
<i class="icon iconfont">&#xe69e;</i>
<div class="name">uniE645</div>
<div class="code">&amp;#xe69e;</div>
</li>
<li>
<i class="icon iconfont">&#xe69f;</i>
<div class="name">uniE657</div>
<div class="code">&amp;#xe69f;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a0;</i>
<div class="name">uniE665</div>
<div class="code">&amp;#xe6a0;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a1;</i>
<div class="name">uniE668</div>
<div class="code">&amp;#xe6a1;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a2;</i>
<div class="name">uniE663</div>
<div class="code">&amp;#xe6a2;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a3;</i>
<div class="name">uniE667</div>
<div class="code">&amp;#xe6a3;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a4;</i>
<div class="name">uniE669</div>
<div class="code">&amp;#xe6a4;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a5;</i>
<div class="name">uniE679</div>
<div class="code">&amp;#xe6a5;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a6;</i>
<div class="name">uniE686</div>
<div class="code">&amp;#xe6a6;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a7;</i>
<div class="name">uniE684</div>
<div class="code">&amp;#xe6a7;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a8;</i>
<div class="name">uniE691</div>
<div class="code">&amp;#xe6a8;</div>
</li>
<li>
<i class="icon iconfont">&#xe6a9;</i>
<div class="name">uniE720</div>
<div class="code">&amp;#xe6a9;</div>
</li>
<li>
<i class="icon iconfont">&#xe6aa;</i>
<div class="name">uniE708</div>
<div class="code">&amp;#xe6aa;</div>
</li>
<li>
<i class="icon iconfont">&#xe6ab;</i>
<div class="name">uniE731</div>
<div class="code">&amp;#xe6ab;</div>
</li>
<li>
<i class="icon iconfont">&#xe6ac;</i>
<div class="name">uniE661</div>
<div class="code">&amp;#xe6ac;</div>
</li>
<li>
<i class="icon iconfont">&#xe6ad;</i>
<div class="name">uniE739</div>
<div class="code">&amp;#xe6ad;</div>
</li>
<li>
<i class="icon iconfont">&#xe6ae;</i>
<div class="name">uniE78B</div>
<div class="code">&amp;#xe6ae;</div>
</li>
<li>
<i class="icon iconfont">&#xe6af;</i>
<div class="name">uniE761</div>
<div class="code">&amp;#xe6af;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b0;</i>
<div class="name">uniE741</div>
<div class="code">&amp;#xe6b0;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b1;</i>
<div class="name">uniE758</div>
<div class="code">&amp;#xe6b1;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b2;</i>
<div class="name">uniE791</div>
<div class="code">&amp;#xe6b2;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b3;</i>
<div class="name">uniE769</div>
<div class="code">&amp;#xe6b3;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b4;</i>
<div class="name">bing</div>
<div class="code">&amp;#xe6b4;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b5;</i>
<div class="name">sakura-black</div>
<div class="code">&amp;#xe6b5;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b6;</i>
<div class="name">pixiv-gray</div>
<div class="code">&amp;#xe6b6;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b7;</i>
<div class="name">gear</div>
<div class="code">&amp;#xe6b7;</div>
</li>
<li>
<i class="icon iconfont">&#xe6b8;</i>
<div class="name">dots</div>
<div class="code">&amp;#xe6b8;</div>
</li>
</ul>
<h2 id="unicode-">unicode引用</h2>
<hr>
<p>unicode是字体在网页端最原始的应用方式特点是</p>
<ul>
<li>兼容性最好支持ie6+,及所有现代浏览器。</li>
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
<li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
</ul>
<blockquote>
<p>注意新版iconfont支持多色图标这些多色图标在unicode模式下将不能使用如果有需求建议使用symbol的引用方式</p>
</blockquote>
<p>unicode使用步骤如下</p>
<h3 id="-font-face">第一步拷贝项目下面生成的font-face</h3>
<pre><code class="lang-js hljs javascript">@font-face {
font-family: <span class="hljs-string">'iconfont'</span>;
src: url(<span class="hljs-string">'iconfont.eot'</span>);
src: url(<span class="hljs-string">'iconfont.eot?#iefix'</span>) format(<span class="hljs-string">'embedded-opentype'</span>),
url(<span class="hljs-string">'iconfont.woff'</span>) format(<span class="hljs-string">'woff'</span>),
url(<span class="hljs-string">'iconfont.ttf'</span>) format(<span class="hljs-string">'truetype'</span>),
url(<span class="hljs-string">'iconfont.svg#iconfont'</span>) format(<span class="hljs-string">'svg'</span>);
}
</code></pre>
<h3 id="-iconfont-">第二步定义使用iconfont的样式</h3>
<pre><code class="lang-js hljs javascript">.iconfont{
font-family:<span class="hljs-string">"iconfont"</span> !important;
font-size:<span class="hljs-number">16</span>px;font-style:normal;
-webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: <span class="hljs-number">0.2</span>px;
-moz-osx-font-smoothing: grayscale;
}
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
<pre><code class="lang-js hljs javascript">&lt;i <span class="hljs-class"><span class="hljs-keyword">class</span></span>=<span class="hljs-string">"iconfont"</span>&gt;&amp;#x33;<span class="xml"><span class="hljs-tag">&lt;/<span class="hljs-name">i</span>&gt;</span></span></code></pre>
<blockquote>
<p>"iconfont"是你项目下的font-family。可以通过编辑项目查看默认是"iconfont"。</p>
</blockquote>
</div>
</body>
</html>