Why not suggest an IMG tag to control the size of a picture

Source: Internet
Author: User
Keywords What tags size

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Once a client told me that in the website backstage uploaded news pictures, it's a camera. But beyond the scope of the page display, there is a scroll bar, ask me how to deal with, I told him to use the image processing software to deal with the picture to the appropriate size and then upload, such as processing into a 600-pixel width, height proportionally scaling, He told me that the previous site does not have to deal with pictures, the size is the same, not the case, and then after some explanation he understood the benefits of doing so.

When creating templates for site content pages with Div and CSS, we will have some of the content of the fixed style, such as the title in the number of words, what color, the release time with what font, what color, and so on, the content of the page is naturally also the picture, these pictures are through the corresponding Web site content management system uploaded to the server , a reference to the IMG tag in the content page is displayed on the Web page.

Photography with the camera pixel in general far more than the size of the page content area browsing, and the size of the picture itself in the 1M or so, 8630.html "> Sometimes for the convenience of directly to the picture, and then use CSS to unify the control of the width of the picture, a high degree of automatic adaptation, But doing so only makes the image pixels that Web surfers see become smaller, seems to be very coordinated with the content, in fact, the page has loaded this picture of 1M or so, if a page has several news pictures, it is necessary to continuously load a lot of 1M size of the picture, when the speed of the Web page open obviously slowed, And some of the pictures will have some degree of distortion.

In addition, if the size of the picture in the content is written to death, sometimes upload some attachments, there will be a small icon in the attachment, because this small icon is introduced with the IMG tag, it will also be "magnified", to solve this problem and must be individually modified the style of this icon, is very troublesome, And the general content of the update people often do not understand these technical work.

When the site is revised, may not be the original company is responsible for, and these uploaded to the server if the picture is not handled, "Picture loading slow" problem will still not be resolved, because the person responsible for the revision is not all of your pictures to deal with.

There are a lot of effects that can be achieved technically, but not all of the programs are reasonable, so, as the site construction of technical personnel, to form this for the image first processing, upload after the habit, that is, how many pixels to display the page, how to deal with the number of pixels in advance to upload, not only can save disk space, It also improves the speed of the viewer's open page.

This article is from: http://www.sunfei.net

Related Article

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.