123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <title>IconFont</title>
- <link rel="stylesheet" href="demo.css">
- <link rel="stylesheet" href="iconfont.css">
- </head>
- <body>
- <div class="main">
- <h1>IconFont 图标</h1>
- <ul class="icon_lists clear">
-
- <li>
- <i class="icon iconfont">󰀑</i>
- <div class="name">首页</div>
- <div class="code">&#xf0011;</div>
- <div class="fontclass">.shouye</div>
- </li>
-
- <li>
- <i class="icon iconfont"></i>
- <div class="name">系统_设置</div>
- <div class="code">&#xe80e;</div>
- <div class="fontclass">.xitongshezhi</div>
- </li>
-
- <li>
- <i class="icon iconfont"></i>
- <div class="name">详细内容介绍</div>
- <div class="code">&#xe627;</div>
- <div class="fontclass">.xiangXiNeiRongJieShao</div>
- </li>
-
- <li>
- <i class="icon iconfont"></i>
- <div class="name">会员</div>
- <div class="code">&#xe61a;</div>
- <div class="fontclass">.huiyuan</div>
- </li>
-
- <li>
- <i class="icon iconfont"></i>
- <div class="name">电视</div>
- <div class="code">&#xe64b;</div>
- <div class="fontclass">.icondianshi</div>
- </li>
-
- </ul>
- <div class="helps">
- 第一步:使用font-face声明字体
- <pre>
- @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- */
- }
- </pre>
- 第二步:定义使用iconfont的样式
- <pre>
- .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;}
- </pre>
- 第三步:挑选相应图标并获取字体编码,应用于页面
- <pre>
- <i class="iconfont">&#x33;</i>
- </pre>
- </div>
- </div>
- </body>
- </html>
|