Three methods for importing css styles into webpages

Source: Internet
Author: User

Three methods for importing css styles into webpages,
If you are careful, you will find that many major portal sites directly write css in the document. There are also many sites with link links and some sites with import such as taobao. so what are their advantages and disadvantages? Let's take a look.
I. Directly writing css on the page and loading the page at the same time can reduce the connection thread on the server. This is why large websites are directly written in the document, because traffic is large, you need to consider it everywhere.
2. link is imported to the outside, so the link style is loaded only after the page content is loaded. This makes loading interrupted when the network speed is slow, the page is messy. I think you should have read it,
3. What is the role of import? In fact, the difference between it and link is that import must wait until all pages are loaded before loading the css document, in addition, link can connect to various types of document link labels. In addition to loading CSS, link can also do many other things, such as defining RSS and rel connection attributes, @ import: Only CSS can be loaded.

Well, I understand this much. For the original site reprinted, please note: www.111cn.net/cssdiv/css.html

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.