About CSS
Use CSS for website acceleration
The key indicator of Web site availability is speed. More specifically, the speed at which a page can appear in a visitor's browser window. There are many factors that affect the speed, including the speed of the Web server, the Internet connection of visitors, and the size of files that must be downloaded by the browser. Although you cannot control the server and connection speed, you can control the file size on the web page of the website.
To make websites faster, Web Builders compress and optimize each image file on the website as usual, this often compromises the image quality to reduce the file size by several percentage points. Since CSS style sheets are plain text files and are relatively small compared with images, Web Builders seldom consider taking measures to reduce the size of their CSS style sheet files. However, you can greatly reduce the size of a style sheet by using CSS abbreviations and other simple techniques. In an informal special test on my own style sheet, I reduced the file size by about 25-50%.
Use CSS for website acceleration
The key indicator of Web site availability is speed. More specifically, the speed at which a page can appear in a visitor's browser window. There are many factors that affect the speed, including the speed of the Web server, the Internet connection of visitors, and the size of files that must be downloaded by the browser. Although you cannot control the server and connection speed, you can control the file size on the web page of the website.
To make websites faster, Web Builders compress and optimize each image file on the website as usual, this often compromises the image quality to reduce the file size by several percentage points. Since CSS style sheets are plain text files and are relatively small compared with images, Web Builders seldom consider taking measures to reduce the size of their CSS style sheet files. However, you can greatly reduce the size of a style sheet by using CSS abbreviations and other simple techniques. In an informal special test on my own style sheet, I reduced the file size by about 25-50%.
Use the abbreviation of CSS
The shorthand property of CSS is a special property name used to replace multiple sets of related properties. For example, the padding property is the top gap (padding-top), the right gap (padding-right), the bottom gap (padding-bottom), and the left gap (padding-left).
Using the write-down property allows you to compress multiple property/attribute pair attributes into a row of code in the CSS style sheet. For example, think about the following code:
. Sample1 {
Margin-top: 15px;
Margin-right: 20px;
Margin-bottom: 12px;
Margin-left: 24px;
Padding-top: 5px;
1st 2 3 4 5 6 7 8 9 pages