CSS changes font size without affecting Web pages

Source: Internet
Author: User
css| Web page

We use CSS to set Web pages, tables, and font sizes in our web pages, typically using a 9-pound word that is popular on the Web:

<style type=text/css>
Body {COLOR: #ff0000; Font-family: Song body; FONT-SIZE:9PT}
</STYLE>

In CSS, I set the font-size to 9pt, when the display is set to small font, we see the small number fifth font display, but in the setting of large font of the computer will become 11 pounds, the page will naturally disorderly.

CSS can identify a variety of numerical units, there are generally two types of text size to determine the common units: PT (points) and px (pixels). PT represents the dot of the dot matrix font in the text mode, and PX is the pixel unit of the screen. Since all computer systems support PX units, only because the resolution of each computer's display screen is different, but now the difference in computer resolution is not obvious, so this problem is well solved. There is a simple conversion between them, is the PT unit multiplied by 4/3 px units, so the page font-size set to 12px (with 9pt size), you can solve this problem. Set into large font look, and small font no difference!



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.