Which of the sprite (CSS Sprite) or the font icon (Icon Font) is more suitable for use in a production environment in 2018?

I have mentioned sprite in many articles about front-end website optimization and request optimization, but I have never used it in my actual production project. Observe that the major platforms (Taobao, Tmall, JD.com, SUNING, etc.) have basically abandoned Sprite in the web page.

so is Sprite worth promoting in 2018?

Apr.03,2021

fonts and icons are definitely better, but some icons and fonts are not easy to get, so you can use Sprite. Look at the project requirements and don't stick to the choice


.

based on the above answer, go on to say
for the Taobao and Tmall you mentioned, most of them are e-commerce websites. At present, they have used more font icons.
in addition to font icons, there are SVG icons
example: Ali Icon Library

. < hr >

in response to your question, I have specially looked through these sites
JD.com still has a lot of materials and sprite pictures used by ICON

https://img.codeshelper.com/upload/img/2021/04/03/ddqjqluxy1e15186.png
https://img.codeshelper.com/upload/img/2021/04/03/fywiojbm3bg15187.png
< hr >

but the problem is that we don't have to follow in the footsteps of big manufacturers
first of all, you need to know what the benefits of sprite are
, and then whether you need to use
in your project, because sprite is not just part of ICON

.

I am the front end I like font icons if it is icon
if you are doing H5 animation, then you can only use sprite


each has its own advantages, and each has its own most suitable scenarios. For example, you can't do excessive animation if you use font icons, but it's easy to use sprite, and it's easy to do it with css3's animation,.
for example, the animation I did in my article can only use sprite images.


each has its own advantages, but the sprite image used in rem layout is difficult to calculate, and another point is the defect of using the picture. The picture may be blurred at high resolution. The shortcomings of using font files are also obvious, for example, the support of multicolor icons is not perfect, if you need colorful icon, font files are not appropriate. Depending on the situation, choose a sprite image, a font file or a single picture. There is no saying which is the best, only which way is more suitable for your project.
it is recommended that you take a look at the application of Iconfont multicolor icons and gradient icons

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1beea8b-31c25.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1beea8b-31c25.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?