ÍøÂçѧԺ w3popÉçÇø ÍøÂç×ÊÔ´ ITÐÂÎÅ

w3pop.com :: ÍøÂçѧԺ :: Éè¼ÆÀíÄî :: ÍøÕ¾ÖеÄͼƬÉè¼Æ

»áÔ±µÇ½

ÕʺÅ

ÃÜÂë

»Ø´ð

¼ÇסÃÜÂë

Íü¼ÇÃÜÂë? ×¢²á

Éè¼ÆÀíÄî
ÍøÕ¾Éè¼ÆÔ­Àí
±ð¾ßÒ»¸ñµÄÍøÕ¾ÆÀ..
ÀûÓÃ.htaccess¿ØÖ..
ÈçºÎ½øÐÐÍøÕ¾²¼¾Ö
³É¹¦¹¹½¨ÍøÕ¾µÄ·½..
ÀûÓÃJavaScript¸ü..
FTP½éÉÜ
·½±ã¡¢¿ì½ÝµØÖÆ×÷..
ÍøÕ¾ÖеÄͼƬÉè¼Æ
ÓÅ»¯ÍøÕ¾Ö÷Ò³
Îı¾ÓëͼƬ£¬ÄÄÏî..
³É¹¦Éè¼ÆÍøÕ¾µÄ50..
ÎªÍøÕ¾Ìí¼ÓÉùÒôÄÚ..
ÍøÕ¾Éè¼ÆÊ®´ó´íÎó
±ÜÃâ³öÏÖÍøÕ¾Éè¼Æ..
ÍøÕ¾Éè¼ÆÓ¦¸ÃÁé»î
³É¹¦½â¾öͼƬÎÊÌâ
ÊÊÓÚ´òÓ¡µÄÍøÒ³Éè..
ÍøÕ¾ÖбÜÃâ³öÏÖµ¯..
±£Ö¤ÍøÕ¾µÄ¼æÈÝÐÔ

ÍøÕ¾ÖеÄͼƬÉè¼Æ


×÷Õß:Dan Prinzing ·­Òë/ÕûÀí:w3pop.com ·¢²¼:2008-02-14 ä¯ÀÀ:2448 :: ::

I've talked a lot about the need for speed. Specifically, the importance of your web pages loading quickly. Images are the number one culprit. Like a vampire, they are seductive and at the same time suck the life out of your site. (By the way, since this article deals with images, I will be using some as examples and this will cause the pages to take a while to load.)

ÎÒÔø¾­Ëµ¹ý£¬ÍøÒ³ÏÂÔØËٶȺÜÖØÒª£¬¶øÍ¼Æ¬¾ÍÊÇ×è°­ÏÂÔØËٶȵÄÊ×ÒªÒòËØ¡£Í¼Æ¬È·ÊµºÜÓÕÈË£¬µ«ÊÇ»áÕ¼¾ÝÍøÕ¾ºÜ¶à¿Õ¼ä¡£Ë³±ã˵һÏ£¬ÔÚÕâÆªÎÄÕÂÖУ¬ÎÒ»á½éÉÜ×è°­ÍøÒ³ÏÂÔØµÄ¼¸¸öÒòËØ¡£

Everyone wants to use images. They can be interesting and give your web site some style. Also, if you're selling something on-line, the prospective customer likes to have a look at what they are buying. Imagine the old Sears catalog without any pictures, just descriptions. Pull out the Yellow Pages and notice how the ads with pictures grab your attention first. So, we could have a page load lightening fast without any images, but that would be very boring. Yes, we need speed, but unless we're simply looking for information, we want a picture or two.

Ã¿Ò»Î»ÍøÕ¾Éè¼ÆÕß¶¼Ï£ÍûÔËÓÃͼƬ£¬Í¼Æ¬¿ÉÒÔÈÃÍøÕ¾¸ü¼Ó¾ßÓÐÎüÒýÁ¦¡£ÔÚÏßÏúÊÛ²úÆ·µÄÍøÕ¾£¬ÐèҪΪÓû§Ìṩ¾ßÓÐÊÓ¾õÎüÒýÁ¦µÄÄÚÈÝ£¬¶ø²»½ö½öÊǼòµ¥µÄÎÄ×Ö˵Ã÷£¬µç»°»ÆÒ³ÖÐÄÇЩ´øÓÐͼƬµÄ¹ã¸æÊDz»ÊǺܾßÓÐÎüÒýÁ¦ÄØ£¿Òò´Ë£¬Ã»ÓÐͼƬµÄÍøÕ¾È·Êµ¿ÉÒÔ¼õÉÙÍøÕ¾ÏÂÔØÊ±¼ä£¬µ«ÄÚÈÝȴûÓÐÎüÒýÁ¦¡£Êǵģ¬ÎÒÃÇÐèÒªÌá¸ßÍøÕ¾ÏÂÔØËÙ¶È£¬µ«ÎÒÃÇÒ²ÐèÒªÒ»¡¢Á½ÕÅͼƬ£¬³ý·ÇÎÒÃǽö½öÊÇѰÕÒÐÅÏ¢¡£

Remember the old Chinese saying, "One picture is worth a thousand words"? Unfortunately, some pictures take longer than ten thousand words to load. Much of the time the problem is the images were not properly prepared for use on the internet. Images are usually in a GIF or JPEG format. Without going into too much technical detail, you have probably seen these file extensions on images you have downloaded or used with e-mail. It may look something like this, "name.gif" or "name2.jpg", etc. Generally speaking, the GIF is best used for graphics such as cartoons or font images and JPEG (same as JPG) is best used for photographs. There are other formats, but the principles are the same for most.

ÖйúÓоäË×Ó“Ò»ÕÅͼƬµÖµÃ¹ýǧÑÔÍòÓ¬µ«ÊÇͼƬµÄÏÂÔØÊ±¼ä»á±ÈÒ»Íò¾ä»°µÄʱ¼ä¶¼³¤¡£ÏÖÔÚͼƬµÄ²»ºÏÀíÀûÓóÉΪһ¸öÖ÷ÒªÎÊÌ⡣ͼƬͨ³£ÊÇGIF»òÕßJPEG¸ñʽ£¬²»Òª¿¼ÂÇÌ«¶à¼¼ÊõÎÊÌ⣬Äã¿ÉÄÜÏÂÔØ¹ý»òÕßÔÚµç×ÓÓʼþÖÐÔËÓùýÕâЩͼƬ£¬Í¼Æ¬µÄÃû³ÆÀàËÆÓÚ“Ãû×Ö.gif”»òÕß“Ãû×Ö2.gif”µÈ¡£Ò»°ãÀ´Ëµ£¬GIF¸ñʽÊÊÓÃÓÚ¶¯»­»òÕß×ÖÌåͼÏñµÈÄÚÈÝ£»JEPG£¨¼ò³ÆJPG£©¸ñʽÊÊÓÃÓÚÕÕÆ¬¡£µ±È»»¹ÓкܶàÆäËü¸ñʽ£¬µ«Ê¹ÓÃÔ­ÔòÏàͬ¡£

Each image is a file and each file is made up of bytes. The number of bytes will determine how long the image will take to load. They can also determine how sharp the image is. Don't confuse the displayed dimensions (physical size) of an image with its file size. A common mistake I have seen by novice webmasters is using the width and height elements of an image tag to size the image for the page. Below is an example of this:

ÿһ·ùͼƬ¾ÍÊÇÒ»·ÝÎļþ£¬¶øÃ¿·ÝÎļþÔòÓÉ×Ö½Ú×é³É¡£ÎļþµÄ×Ö½ÚÊý¾ö¶¨Í¼Æ¬µÄÏÂÔØÊ±¼ä¡¢ÏÂÔØËÙ¶È¡£ÎÒ¿´µ½¾­ÑéÉÙµÄÍøÕ¾Éè¼ÆÕßÒ×·¸µÄÒ»¸ö´íÎó¾ÍÊÇ£¬ÀûÓÃͼƬ±êÇ©µÄ³¤¶ÈÓë¿í¶ÈÔªËØ¶¨ÒåÍøÒ³µÄͼƬ³ß´ç£¬ÏÂÃæ¾ÍÊÇÒ»¸öÀý×Ó£º

Images_For_The_Web

All three of images above are from the exact same file. (A picture of Lucy Liu from Charlie's Angels, I think. Anyway, thanks, Columbia Pictures) I have compressed the image to about 19 kb (kilobytes or thousand bytes). More on compression in a few minutes. However, the actual image dimension in pixels is 179 x 268. The one on the left appears much larger and the one on the right appears much smaller. The one in the center is displayed with its proper dimensions.

ÒÔÉÏÈýÕÅͼƬԴ×ÔͬһÎļþ£¨ÁõÔ£ÁáµÄͼƬ£©¡£ÎÒÒѾ­°ÑͼƬѹËõΪ19kb£¬È»ºóÔÙ´ÎѹËõ£¬È»¶øÍ¼Æ¬Êµ¼ÊÏñËØ³ß´çΪ179x268¡£×ó±ßµÄͼƬ±È½Ï´ó£¬ÓұߵÄͼƬ±È½ÏС£¬ÖмäµÄͼƬ³ß´çÊÊÖС£

So, how was this accomplished? As I mentioned, the width and height elements of the image tag were manipulated to change the size of the image. Manipulating an image's dimensions this way is a major mistake. I could have left these elements out of the image tag and the image would have been displayed in its proper dimensions. So, you might suspect that those elements are for resizing the image. Wrong. The width and height elements are to allow the browser to calculate how much space to allocate for an image. This helps the page load faster.

ÄÇôÈçºÎÉè¼Æ³ö³ß´çÊʵ±µÄÍ¼Æ¬ÄØ£¿ÉÏÃæÎÒÌáµ½¹ý£¬ÎÒÃÇ¿ÉÒÔ¸ù¾ÝͼƬÏñËØ±êÇ©ÖеĿí¶ÈÓë¸ß¶ÈÔªËØ£¬¸Ä±äͼƬµÄ³ß´ç´óС¡£¸Ä±äͼƬ¿Õ¼ä³ß´çÊÇÒ»¸ö´ó´íÎó£¬Äã¿ÉÄÜÈÏΪ£¬¼ÙÈç²»¿¼ÂDZêÇ©ÖеijߴçÔªËØ£¬Í¼Æ¬¾Í»áÒÔºÏÊʵijߴç³ÊÏÖ³öÀ´£¬ËùÒÔÕâÐ©ÔªËØ¿ÉÒÔµ÷ÕûͼƬ´óС¡£ÕâÖÖÏë·¨²¢²»ÕýÈ·£¬³¤¶ÈÓë¿í¶ÈÔªËØÖ»ÊǰïÖúä¯ÀÀÆ÷¼ÆËãͼƬËùÕ¼ÓõĿռ䣬ÒÔÌá¸ßÍøÒ³ÏÂÔØËÙ¶È¡£

Besides, resizing an image using the width and height elements of the image tag can distort the picture, especially when making it larger. Fortunately, with the previous examples I kept the ratio of width to height the same. If I hadn't, the picture could be distorted such as this:

´ËÍ⣬¸Ä±äͼƬ±êÇ©ÖеĿí¶ÈÓë¸ß¶ÈÊôÐÔ£¬»áʹͼƬ·¢Éú±äÐΣ¬ÓÈÆäÊǵ±Ôö´óͼƬ³ß´çʱ¡£Ç°ÃæµÄÀý×ÓÖУ¬ÎÒÔËÓÃÁËÏàͬµÄ¿í¶ÈÓë¸ß¶È±È£¬ËùÒÔÄÇÕÅͼƬûÓбäÐΡ£

Images_For_The_Web

Here are the image tags I used for each of the previous examples. All that I changed was the width and height elements and the "alt" element. The "alt" element is used to describe the image or the image's purpose. It has nothing to do with the image file itself and will be the topic of another discussion.

ÒÔÉϼ¸ÕÅͼƬµÄ±êÇ©ÈçÏ£¬ÎÒÖ»ÊǸıäÁ˳¤¶È¡¢¿í¶ÈÒÔ¼°“alt”ÄÚÈÝ¡£“alt”ÔªËØÓÃÀ´ÃèÊöͼƬ»òÕßͼƬ
ÓÃ;£¬ÓëͼƬÎļþûÓйØÏµ£¬ÎÒÃÇÒÔºóÔÙ×öÌÖÂÛ¡£

Picture 1
£¨Í¼Æ¬1£©:<img src="Images/liu_1.jpg" width="197" height="295" alt="Lucy Liu Picture 1">

Picture 2
£¨Í¼Æ¬2£©:<img src="Images/liu_1.jpg" width="179" height="268" alt="Lucy Liu Picture 2">

Picture 3
£¨Í¼Æ¬3£©:<img src="Images/liu_1.jpg" width="89" height="134" alt="Lucy Liu Picture 3">

Picture 4
£¨Í¼Æ¬4£©:<img src="Images/liu_1.jpg" width="200" height="200" alt="Lucy Liu Picture 4">

No matter what dimensions were specified in the tag, the same 19 kb file was accessed. Each of those four pictures took the same amount of time to load. Now that they are most likely in your computer's cache, they will load very quickly, if you revisit their page soon. The cache remembers file names and saves the file. It then loads them from your computer on your next visit, if they are still in the cache. Some Internet service providers (ISPs) such as AOL have their own cache to speed up page loading for their subscribers. The downside is you're usually not seeing the best quality image or even the correct image, if it has recently changed. The image file's contents could be completely changed and the file name kept and this would cause you to see the previous image, rather than the actual current image until the cache is cleared.

²»¹Ü±êÇ©ÖеijߴçÊǶàÉÙ£¬Îļþ×ÜΪ19kb£¬Ò²¾ÍÊÇ˵ÕâËÄÕÅͼƬÐèÒªµÄÏÂÔØÊ±¼äÏàͬ¡£ÍøÕ¾Óû§ÔٴεÇÂ¼ÍøÕ¾Ê±£¬Í¼Æ¬¿ÉÄÜÒѾ­Î»ÓÚ¼ÆËã»ú´æ´¢Æ÷ÖУ¬ÄÇÃ´ÍøÒ³ÏÂÔØËÙ¶È»áºÜ¿ì¡£´æ´¢Æ÷¼ÇסÁËÎļþÃû£¬±£´æÁËÎļþ£¬ËùÒÔÔÙ´Îä¯ÀÀÕâЩÄÚÈÝʱ£¬¼ÆËã»ú»á´Ó´æ´¢Æ÷ÖÐÏÂÔØÕâЩÄÚÈÝ¡£ÖîÈçAOLÒ»ÑùµÄÍøÂç·þÎñÌṩ¹«Ë¾£¬ÓµÓÐ×Ô¼ºµÄ´æ´¢Æ÷£¬¿ÉÒÔÌá¸ß×Ô¼ºÍøÕ¾µÄÏÂÔØËÙ¶È¡£Èç¹ûͼƬÐ޸IJ»Êʵ±£¬Äã¿ÉÄܲ»»á¿´µ½×îÓÅÖÊ£¬ÉõÖÁÊÇÖÊÁ¿Ò»°ãµÄͼƬ¡£Í¼Æ¬ÎļþÄÚÈÝ¿ÉÄÜÍêÈ«¸Ä±ä£¬µ«ÎļþÃû³Æ²»±ä£¬ÄÇôÄã»áä¯ÀÀµ½ÒÔǰµÄͼƬ£¬¶ø²»ÊÇʵ¼ÊÀûÓõÄͼƬ£¬³ý·ÇÇå³þ´æ´¢Æ÷ÄÚÈÝ¡£

So, now that we know that we should resize an image before we use it on our web page and we should state its proper dimensions in the image tag, what's the other common mistake we should avoid? File size. File size is made up by the number of bytes used to compile the image. The more bytes, the larger the file. The larger the file, the longer it takes to load.

Òò´Ë£¬¼ÈÈ»ÎÒÃÇÔÚÀûÓÃͼƬ֮ǰ£¬Ó¦¸Ã¸Ä±äͼƬ³ß´ç£¬Ó¦¸ÃÔÚͼƬ±êÇ©ÖÐ˵Ã÷ͼƬ³ß´ç£¬ÄÇôÎÒÃÇ»¹Ó¦¸Ã±ÜÃâ³öÏÖʲô´íÎóÄØ£¿Îļþ³ß´ç¡£Îļþ³ß´çÓɱ༭ͼƬµÄºÜ¶à×Ö½Ú×é³É£¬×Ö½ÚÔ½¶à£¬Îļþ³ß´çÔ½´ó£»Îļþ³ß´çÔ½´ó£¬ÏÂÔØÊ±¼äÔ½³¤¡£

Not to pick on Lucy Liu anymore, I will show you examples using a picture I took of a dragonfly. The original image taken with a digital camera was 1760 x 1168 in pixels and a file size of 6.167 megabytes. That's mega as in million. Those dimensions are way too big to display well on a web page and you could eat a sandwich waiting for it to load 6 meg, even if you have broadband. Remember, most visitors still use dial-up modems. Still, I want to share my dragonfly picture with you on the web, so I have to make it faster loading and a reasonable size.

ÕâÀï²»ÔÙÒÔÁõÔ£ÁáµÄÕÕÆ¬ÎªÀý£¬¶øÒÔÎÒÅÄÉãµÄòßòÑÕÕÆ¬ÎªÀý¡£ÀûÓÃÊýÂëÏà»úÅÄÉãµÄԭʼÕÕÆ¬ÏñËØÎª1760x1168£¬Îļþ³ß´çΪ6.167M£¨M´ú±í°ÙÍò×Ö½Ú£©¡£ÕâÕÅͼƬµÄ³ß´çÌ«´ó£¬¼´Ê¹ÀûÓÃ¿í´øÉÏÍø£¬Ò²ÐèÒª»¨·ÑºÜ³¤Ê±¼äµÈ´ý6MµÄͼƬÏÂÔØ£¬¿öÇÒÏÖÔÚ»¹ÓкܶàÀûÓõ绰²¦ºÅÉÏÍøµÄÓû§¡£Èç¹ûÎÒÏëÔÚÍøÒ³ÖÐÔËÓÃÕâÕÅͼƬ£¬¾ÍÐèÒª¸Ä±äͼƬ³ß´ç¡£

Here is a "thumbnail" representation of the original picture. It is highly compressed (small file size) and small in dimensions at only 5% of the original at 88 x 58.

ÏÂÃæÕâÕÅÕÕÆ¬ÊÇԭʼÕÕÆ¬µÄËõС°æ±¾£¬ÊǾ­¹ý¸ß¶ÈѹËõµÄ£¬Îļþ³ß´ç±È½ÏС£¬¿Õ¼ä³ß´çÊÇԭʼͼƬµÄ
5%
£¬Ö»ÓÐ88x58ÏñËØ¡£

Images_For_The_Web

It's hard to discern and just gives you a vague idea of what the original image is. That is exactly what a thumbnail's purpose is. Usually, a thumbnail is linked to a larger, more detailed image. This one is not. If you had several products to sell and you put their images all on the same page in their full file size, the page could take a long time to load and many visitors wouldn't wait. However, if you used thumbnail images of the products, they would load quickly and the visitor could then select specific image(s) for closer inspection without waiting for images, they don't want to see, load.

΢ÐÍͼƬµÄ×÷ÓÃÖ»ÊÇÊ¹ÍøÕ¾·ÃÎÊÕß¶ÔͼƬÓÐÒ»¸öÄ£ºýµÄÁ˽⣬²¢²»ÄÜÈÃËûÃÇÇå³þµØÈÏʶͼƬ¡£Í¨³££¬Î¢ÐÍͼƬ¿ÉÒÔÓë¸ü´óµÄ¡¢¸üÇå³þµÄͼƬÁ´½Ó£¬µ«ÕâÒ»ÕŲ¢²»ÄÜ¡£Èç¹ûÍøÒ³ÖзÅÖÃÌ«¶àµÄ²úƷͼƬ£¬ÍøÒ³ÏÂÔØÊ±¼ä¾Í»áºÜ³¤£¬Ðí¶à·ÃÎÊÕß¿ÉÄÜ»áÒò´Ë¶øÀ뿪¡£È»¶ø£¬Èç¹ûÀûÓÃ΢ÐÍͼƬ£¬ÍøÒ³µÄÏÂÔØËٶȾͻáÌá¸ßºÜ¶à£¬ÍøÕ¾·ÃÎÊÕß¿ÉÒÔÌôÑ¡×Ô¼ºÏ²»¶µÄͼƬ£¬Á´½Óºó×Ðϸä¯ÀÀ£¬²¢²»ÐèÒªÀ˷ѺܶàÏÂÔØÊ±¼ä¡£

To manipulate images, you're going to need image editing software to accomplish this. Lack of such tools is the reason many novice webmasters don't compress their images and use the width and height elements to size them. This is an article on what needs to be done, not how to do it. Teaching you how to use your image editing software is beyond the scope of this discussion. That being said, you need to size your image. Usually, but not always, this entails making it smaller. The first step is to ask yourself whether the entire image is needed. Since I'm focusing on the dragonfly, you don't need to see my entire backyard. Thus, I will crop the picture. Even so, the image dimensions are still too large at 668 x 488 and the file size is still huge at 978 kb (almost 1 meg). At least I'm now focused on my subject, the dragonfly.

ÄãÐèÒªÀûÓÃͼƬ±à¼­¹¤¾ß£¬ÐÞ¸ÄͼƬ¡£ºÜ¶à¾­ÑéÉÙµÄÍøÕ¾Éè¼ÆÕß¾ÍÊÇÒòΪºöÊÓÁËÕâ¸öÒòËØ£¬²ÅûÓÐѹËõͼƬ£¬¶øÀûÓø߶ȡ¢¿í¶ÈÔªËØÐÞ¸ÄͼƬ³ß´ç¡£ÕâÆªÎÄÕÂÖ»ÊǽéÉÜÄãÐèÒª×öʲô£¬¶ø²»ÊǽéÉÜ×öµÄ·½·¨£¬ËùÒÔÎÒÃÇÕâÀï²»»áÌÖÂÛͼƬ±à¼­Èí¼þµÄʹÓ÷½·¨£¬ÐèÒªÄã×Ô¼ºÇ××ÔÈ¥×ö¡£Í¨³£Çé¿öÏ£¬Í¼Æ¬±ØÐëÒªËõС£¬µ±È»²¢²»ÊÇËùÓÐÇé¿ö¶¼ÕâÑù¡£Ê×ÏÈÄãÐèҪѯÎÊ×Ô¼ºÍøÕ¾ÊÇ·ñÐèÒªÕûÕÅͼƬ£¬±ÈÈç˵ÕâÕÅͼƬ£¬ÎÒÖ»ÊÇÍ»³öòßòÑ£¬²¢²»ÐèҪͻ³öÕû¸ö±³¾°£¬Òò´ËÎÒ»á¶ÔͼƬ½øÐÐÐ޸ġ£¼´Ê¹ÕâÑù£¬ÕâÕÅͼƬµÄ¿Õ¼ä³ß´çÈÔȻΪ668x488£¬Îļþ³ß´çΪ978kb£¨½«½ü1M£©£¬µ«ÖÁÉÙͼƬͻ³öÁËÖ÷Ì⣺òßòÑ¡£

Next, I will resize the image to fit my page. I decide that a 50% reduction in dimensions would be the right size. So, half of 668 x 488 is 334 x 244. It's now the correct dimensions, but the file size is still too big at 245 kb. It needs to be compressed. It will load very quickly, if I compress it down to 5 kb. However, it's not very sharp:

ÏÂÃæ£¬ÎÒ»á¸ù¾ÝÒ³Ãæ×´¿ö£¬ÖØÐµ÷ÕûͼƬ³ß´ç¡£ÎÒ¾ö¶¨¿Õ¼ä³ß´ç¼õÉÙ50%£¨´Ó668x488µ½334x244£©£¬Õâ¸ö³ß´çÕýºÏÊÊ£¬µ«Îļþ³ß´çÈÔÈ»ºÜ´ó£¬Îª245kb£¬ËùÒÔÐèҪѹËõ¡£Èç¹ûͼƬΪ5kb£¬ÏÂÔØËÙ¶È»á·Ç³£¿ì£¬È»¶ø£¬Í¼Æ¬ÖÊÁ¿Ì«²î¡£

Images_For_The_Web

After some experimenting, I decide that 20 kb is a reasonable size. It still gives you a detailed view of the dragonfly without taking too long to load. So, from 1760 x 1168 at 6 meg to 334 x 244 at 20 kb. Here is the finished product:

¾­¹ý¼¸´ÎÐ޸ģ¬ÎÒÈÏΪ20kbΪ×îÀíÏëµÄÎı¾³ß´ç¡£ÕâÑù¼È¿ÉÒÔ±£Ö¤Í¼Æ¬ÖÊÁ¿£¬ÓÖ¿ÉÒÔ±£Ö¤ÏÂÔØËÙ¶È¡£ÏÂÃæÕâÕÅͼƬ¾ÍÊÇ×îÖÕµÄ×÷Æ·£¬Ò²¾ÍÊÇ´Ó1760x1168£¬6MÐÞ¸ÄΪ334x224£¬20kbµÄ×÷Æ·£º

Images_For_The_Web

The basic points in using images on the internet are:
ÍøÒ³ÖеÄͼƬÉè¼ÆÐèҪעÒâÒÔϼ¸µã£º

  • Crop your image when possible to keep the focus where you want it.

    ÔÚÍ»³öͼƬÖ÷ÌâµÄÇé¿öÏ£¬ÐÞ¸ÄͼƬ³ß´ç¡£
  • Don't use the dimension elements of the image tag to size your image. Use your image editing software.

    ±ÜÃâÀûÓÃͼƬ±êÇ©ÖеÄÄÚÈÝ£¬ÐÞ¸ÄͼƬ³ß´ç£¬Ó¦¸ÃÀûÓÃͼƬ±à¼­Èí¼þ¡£
  • Compress the image's file size to as small as possible while retaining as much visual quality as possible.

    ±£Ö¤Í¼Æ¬ÖÊÁ¿µÄͬʱ£¬¾¡¿ÉÄÜѹËõͼƬ¡£
  • Create thumbnails that link to the larger image.

    ´´½¨Óë´óͼƬÁ´½ÓµÄ΢ÐÍͼƬ¡£

ÆÀÂÛ (0) All