Shorthand for CSS

Source: Internet
Author: User

1. Abbreviations for colors

-16 binary forms such as #RRGGBB

-rgb function value forms such as (RGB (x,x,x)) x have two ways of writing, one is an integer between 0~255, the other is a percent sign form such as 20%

-color names such as Red Green

-User system color disk values such as windowtext background

2. Omission of the unit value

When the value is zero, the units of any form can be omitted. such as width:0px can omit not to write.

3 shorthand for internal and external patches

Inside Patch: Padding

External patches: Margin

property:value1; Indicates that all edges are a value value1

Property:value1 value2; Indicates the upper and lower values are value1 and the left and right values are value2

Property:value1 value2 Value3; The value is value1, the left and right values are value2, and the value is value3;

Property:value1 value2 value3 value4; Indicates that the upper and lower left and right values are value1,value2,value3,value4.

4. Shorthand for borders

Border:width style color;

5. Shorthand for background

Background:background-color backgroud-image backgroud-repeat backgroud-attachment backgroud-position;

6 Shorthand for fonts

Font:font-style font-variant font-weight font-size line-height font-family

7. Shorthand for the list

List-style:list-style-image list-style-position List-style-type

Shorthand for CSS

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.