CSS Basic settings

Source: Internet
Author: User

CSS Introduction Method:

Head Introduction: Writing programs on the head of an HTML page (typically used on pages with a large amount of traffic)

Tag Introduction: Write the style directly within the tag (highest priority, but difficult to maintain, will deposit a lot of code)

External introduction: With link tags introduced (commonly used, low maintenance costs, easy revision)

CSS Basic settings

Font property settings: font-family: "Arial"; (Multiple fonts can be set, and the browser will match each other until the appropriate font is matched) The browser is matching the font on the computer from the client computer.

Font style settings: Font-style:normal (normal) italic (italic);

Font bold: Font-weight:bold (bold) normal (not bold);

Font Size setting: font-size: Pixel value px or em;

Set Font color: color: Colors or RGB values or #ccc hexadecimal values;

Text Decoration settings: text-decoration:none (no text decoration) underline (add underscore) overline (add underline) Line-through (add line);

Text indent settings: text-indent: Pixel value px or em (2em the distance of two fonts by font size);

Text Horizontal setting: Text-align:center (center) left (on the right);

Text Vertical settings: Vertical-align:middle (center) Top (top) bottom (Low), (this property is better for table element compatibility, other property settings may not be valid.) The Line-height property is generally used to set the vertical center. )

Row height setting: line-height: px or percent of pixel value, (row height setting is vertically centered when the parent is the same height)

Term Interval property setting: word-spacing: Pixel value px or normal (OK);

Character Interval property setting: letter-spacing: Pixel value px or normal (OK);

Background color settings: background-color: Color or RGB value or #fff hexadecimal value;

Background picture settings: Background-image:url ("Picture path");

Background Picture Tile property settings: Background-repeat:repeat (tile, default) no-repeat (uneven) repeat-y (Y-axis tiling) repeat-x (x-axis tiling);

Background map positioning settings: background-position: (x axis y axis), pixel value px or percent value or azimuth value (left right top bottom);

Background scrolling settings: background-attachment:scroll (background graph scrolls with page scrolling axis) fixed (background graph does not scroll with page scrolling axis);

CSS Basic settings

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.