In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what does the font icon in html5 mean". The explanation in this article is simple and clear, easy to learn and understand. Please follow the ideas of Xiaobian and go deep into it slowly to study and learn "what does the font icon in html5 mean" together!
In html 5, font icons are icons used in Web projects, essentially a special font that appears to users like pictures. Font icons can be like text, free to control its size and color through CSS, for building websites, very convenient.
Operating environment of this tutorial: Windows 7 system, CSS3 && HTML5 version, Dell G3 computer.
What is a font icon?
Font icon simply said, is a special font, through this font, displayed to the user like a picture. The biggest advantage of font icons is that they do not deform and load quickly. Font icons can be like text, free to control its size and color through CSS, for building websites, very convenient.
Font icons are fonts that use tiny images instead of letters. Like characters, each icon font is a vector element that can be scaled as needed and modified using CSS styles.
The main reason for using icon fonts is that you can easily change the size, color, shape. Icon fonts are transparent in nature, so you can place them on any color or type of background, and you can add strokes or change the opacity of icons.
All setup can be done using CSS, so you don't have to create a unique image for each new icon instance in your design (which is useful for keeping your website design and code lightweight).
Icon fonts are vector images, which means they are scalable without distortion. As with other fonts, you can make them larger or smaller as needed. Use icon fonts only as artistic elements, even in other text fields.
Advantages and disadvantages of using font icons
1. Advantages
Icons are easy to scale as long as there is a corresponding class in CSS;
You can easily access existing large icon libraries on the Internet;
Changing icon properties is very easy, no matter what you use to build your website;
It's easy to add icons to any page on your website design (just insert the icon name);
There are thousands of different styles of icons to choose from;
If you need a higher level of customization, you can even create your own icon font.
2. Disadvantages
icons are monochrome or gradient (in most cases, though some services that offer more customization options are changing this);
If you cannot load an icon font, there is no alternate font available;
You may not need a full icon set;
Some browsers do not yet or fully support icon fonts;
You may not be able to find resources that fit your needs.
There are two ways to get font icons
Ali vector icon official website: www.iconfont.cn(recommended)
Foreign website: icomoon.io
How to use font icons?
Due to the slow loading speed of this foreign website, here I use the icon library provided by Ali to demonstrate
(1) Search iconfont in the browser, find Alibaba vector icon library official website, and then register to log in, if registered before, skip this step;
(2) Move the mouse to the icon library, there is a drop-down list, select the official icon library;
(3) Click on the first icon library in the list to open a new page and add your favorite icons to the library;
Add to Library:
(4) There is a shopping cart in the upper right corner, and all the font icons you add to the library are inside;
(5) Click Add to Project
Then the page will automatically jump to the corresponding project, as shown in the figure:
Download to Local: (the most critical step)
The following is a list of the files you downloaded:
(6) How to use font icons in projects is actually very simple, create an i tag or span tag, add a class name and paste the corresponding code complexity on the tag.
To open this demo_index.html, just copy this string of code as shown in the figure:
Then paste iconfont.css into the css folder. This is my projects folder and the corresponding code:
This is the font icon you see in Google Chrome (you can control it with the font-size property if you think the font is too small).
Thank you for reading, the above is "html5 font icon refers to what means" content, after the study of this article, I believe that we have a deeper understanding of the html5 font icon refers to what this problem means, the specific use of the situation also needs to be verified by practice. Here is, Xiaobian will push more articles related to knowledge points for everyone, welcome to pay attention!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.