8 tips for using CSS style sheets with high efficiency

Source: Internet
Author: User
Tags blank page dreamweaver

With the continuous development of the Internet economy, the number of professional websites, public service websites, and enterprise portals on the Internet is growing rapidly, and the amount of information on each website is also increasing explosively. In the face of this huge amount of information, it is a complicated process to add or delete each column on the webpage. To improve the maintenance and update efficiency of webpages, we can use a style sheet to change the appearance of hundreds of webpages at the same time by changing only one file, however, its personalized performance has not suffered any loss. In order to make full use of the power and flexibility of the style sheet, I will talk about some of my experiences on how to use the style sheet effectively.
1. Multiple CSS import methods are called on a webpage at the same time.
There are many ways to introduce CSS in HTML, such as direct plug-in, using the link external style sheet, use CSS "@ import" to import a STYLE sheet and use the "STYLE" mark in internal elements to define a STYLE sheet. Some netizens asked if these methods can be called on a Web page at the same time. Will there be confusion between them? In fact, we don't have to worry so much. That's why it is called "stacked style sheets". Browsers process style sheets on webpages in a certain order, first, check whether there is a direct plug-in CSS on the page. If there is a direct plug-in CSS, execute it first, and ignore the other CSS for this sentence. Then, check the "STYLE" mark in the source code of the webpage, then, check the internal style sheets imported by @ import and the external style sheets of links. Therefore, we can call multiple CSS import methods on a Web page at the same time.
2. Quickly create CSS external files
It is quite difficult for a web designer who first came into contact with CSS to create an external CSS file using an editor such as a WordPad. Because Dreamweaver supports CSS well, it is much easier to use it for help. You can perform the following operations: first, write the names of cells that may be used in the website's webpage on paper, and then bring up the CSS panel in the Dreamweaver editing window to define them one by one, write a bit of relevant content on a blank page, and try it while defining it. If the effect is unsatisfactory, modify it immediately. After all the content is defined, use notepad to create an empty CSS external connection file, copy the defined CSS between head and head to the CSS file.
3. Make the background pattern motionless
When a webpage cannot be displayed on a single screen, we often use the horizontal and vertical scroll bars to browse the content outside the screen. When moving the scroll bar, the image and text are generally moved together, is there any way to make the background image "scroll" with the text? The background is the background image in the webpage. You can replace it with the background image you need:

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.