Just learned html and css would like to ask, some things that can be replaced by pictures need to use code? As shown in the picture

like this appstore, should I insert the whole picture directly, or should I write code to insert only the white apple image? What are the advantages and disadvantages of these two methods?

Mar.13,2021

  • the picture is friendly and can achieve any effect that an artist can achieve, while the text is formatted by CSS and the effect is limited.
  • it is not convenient to modify the picture. It is much easier to redraw the picture every time. It is much easier to change the text and css.
  • pictures are generally larger than text, web pages load more slowly, and text loads faster.
  • if you want to do animation, the text plus CSS is more effective, of course, if it is only a simple effect of switching between two pictures, the picture is also suitable.

in short, it is OK to weigh it according to the actual situation.


No difference, look at the interaction, generally speaking, writing pictures separately is pictures, words


pictures larger than css code can be ignored


insert white apples. If componentized, you only need to pass type (icon) and text to reuse


in order to reduce browser response time, it is best not to use pictures. Because image files also need to be requested, an optimized way to reduce browser response time is to minimize http requests, which is why many websites use sprite to put necessary images in one picture.

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-1eac90c-20ed.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-1eac90c-20ed.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?