Quick reference manual for common CSS information

Source: Internet
Author: User
Tags manual
Text property identifier action property value
Font-family: defines the text type and searches in sequence. The selected value is first found. If none are found, the default value is and.
Font-style: defines the font style.
Normal (standard) italic (italic) oblique (skew)
Font-variant: change the display of English letters normal, small-caps (small uppercase letters)
Font-weight: make the font bold normal (equivalent to 400), bold, lighter, bolder or 100 ~ 9 of 900
Font-size: Specifies any number in the font size. The unit is pt (dot matrix) and px (screen pixel).
Text attribute text-decoration: modifier text underline (underlined) overline (underlined) line-thought (strikethrough) none (underline cleared, default)
Text-align: text display position and method left, right, center, and justify (left-to-right)
Color attribute color: define the font color. 1. Use English words as keywords.
2. Hexadecimal format 3. RGB value. Usage: RGB (255, 0, 0) 0 ~ 255

Background attributes

Background-color: defines the usage of the background color equivalent to "color attribute"
Background-image: defines the background image usage: body {background-image: url(bg.gif )}
Where "bg. jif" is any image
Background-repeat: Copy the background repeat-x in different ways: replicate horizontally
Repeat-y: vertical replication
Fixed scroll of the background-attachment background: the background content is rolled along with the foreground
Fixed: The background does not change.
Background-position: defines the background position top: align the background with the foreground content top
Bottom, left, right
Method: xxpt or x % or left top
(It is a combination of two English words. Note: There are spaces in the middle !!)


Border property margin-top: The default value of the upper boundary of the object is 0.
Keyword: auto
Value: pt, px, in (inches), cm (centimeters)
Margin-right: the right boundary of the object is the same as that of the object.
Margin-bottom: the bottom boundary of the object is the same as that of the object.
Margin-left: the left boundary of the object is the same as that of the object.

Concise setting form annotation of boundaries
DIV {margin: 10 cm} all boundaries are 10 cm
DIV {margin: 10 cm 3 cm} is up and down to 10 cm, about 3 cm
DIV {margin: 1 cm 3 cm 5 cm 7 cm} is 1 cm, right is 3 cm, bottom is 5 cm, left is 7 cm.
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.