Use font awesome to replace your website icon (icons icon)

Source: Internet
Author: User

http://www.thinkcmf.com/font/icons/

The first time using the Font Awesome found quite cool! Its icons are full and can help you save time looking for pictures. Let's study together below:

1: Go to the official website to download the decompression http://fontawesome.io/

2: Unzip and copy to your project and then introduce to your file as follows:

?
1 <linkrel="stylesheet" type="text/css" href="font-awesome-4.0.3/css/font-awesome.css"/>

3: Start using:

?
1 <ahref="#"class="fa fa-trash-o fa-1g"></a>

Note: fa is a global must join.

fa-trash-0 is the icon class (equivalent to the name) you need reference address: http://fontawesome.io/icons/.

The fa-1g control size is also used (FA-2X, fa-3x,fa-4x,fa-5x).

Effect:

Code:

?

1234567891011121314151617181920212223242526272829303132 <!DOCTYPEhtml><html><head>    <title>font icons test</title>    <metacharset="ut-8"/>    <linkrel="stylesheet"type="text/css"href="font-awesome-4.0.3/css/font-awesome.css"/>    <styletype="text/css">        .danger{            display: inline-block;            width: 80px;            height: 30px;            text-align: center;            background: brown;            border-radius: 5px;            font-size: 14px;            line-height: 30px;            text-decoration: none;            color: white;        }    </style></head><body>    <!--用法一-->    <a class="danger"href="#"><iclass="fa fa-trash-o fa-lg"></i>Delete</a>    <!--用法二-->    <iclass="fa fa-trash-o fa-2x"></i> Delete    <iclass="fa fa-trash-o fa-3x"></i> Delete    <iclass="fa fa-trash-o fa-4x"></i> Delete    <!--用法三-->    <a href="#"class="fa fa-trash-o fa-5x"></a></body></html>

Use font awesome to replace your website icon (icons icon)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.