Giter Site home page Giter Site logo

iconfont's Introduction

iconfont

  1. iconfont-阿里巴巴矢量图标库
  2. 选好所需要的小图标后加入购物车,添加至项目
  3. 点击生成代码,复制粘贴到css代码中(在线编译器);或下载压缩包至本地,打开文件iconfont.css,复制全部代码粘贴至css代码中(本地)
@font-face {
  font-family: 'iconfont';  /* project id 694897 */
  src: url('//at.alicdn.com/t/font_694897_q8gyl6kbgmsra4i.eot');
  src: url('//at.alicdn.com/t/font_694897_q8gyl6kbgmsra4i.eot?#iefix') format('embedded-opentype'),
  url('//at.alicdn.com/t/font_694897_q8gyl6kbgmsra4i.woff') format('woff'),
  url('//at.alicdn.com/t/font_694897_q8gyl6kbgmsra4i.ttf') format('truetype'),
  url('//at.alicdn.com/t/font_694897_q8gyl6kbgmsra4i.svg#iconfont') format('svg');
}
  1. 给icon图标所在的标签添加class="iconfont"属性,并添加下面的代码到css代码中
.iconfont{
    font-family: "iconfont" !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size:  ;
    color:  ;
}
  1. 将图标代码(&#xe600)改写成(\e600),添加至css代码中
.iconfont:before { 
  content: "\e600";
}
.iconfont:hover {
  color: #D81E06;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.