CSS is an indispensable part of the XHTML standard era. Effectively reducing the size of CSS files can definitely speed up your website.
List of CSS abbreviations and their general properties.
Background: Background attachment, background color, background image, background position, and repeated background
Border: border color, border style, Border Width
Border-bottom (bottom border): bottom border color, bottom border style, Bottom Border Width
Border-left (left border): border color on the left, border style on the left, Border width on the left
Border-Right (border on the right): border color on the right, border style on the right, Border width on the right
Border-top (top border): Top border color, top border style, top Border Width
Cue (voice prompt): Prompt before and after
Font: font, font size, Font Style, font width, font variant, line height, font size adjustment, font stretch
List-style: List style image, list style position, list style type
Margin (blank): white space on the top, white space on the right, white space on the bottom, and white space on the left
Outline (outline): Outline color, outline style, outline width
Padding: top gap, right gap, bottom gap, left gap
Pause: pause and pause
Reduce white space
For example:
. Sample1 {
Margin-top: 15px;
Margin-Right: 20px;
Margin-bottom: 12px;
Margin-left: 24px;
Padding-top: 5px;
Padding-Right: 10px;
Padding-bottom: 4px;
Padding-left: 8px;
Border-top-width: thin;
Border-top-style: solid;
Border-top-color: #000000;
}
You can replace it with some abbreviations.CodeAs shown in the following figure, the actual effects of the two are the same:
. Sample1 {
Margin: 15px 20px 12px 24px;
Padding: 5px 10px 4px 8px;
Border-top: Thin Solid #000000;
}
Look. Isn't the code missing? Generally, it can be compressed by 25% ~ Of 50%!