What is the difference between importing a style sheet and a link style sheet in CSS? I don't ask the syntax, but the internal difference. How can I see the difference between them?

Source: Internet
Author: User
1. Link labels belong to the XHTML category, while @ import is unique in css2.1. In addition to loading CSS, link labels can also do many other things, such as defining RSS and rel connection attributes. @ import can only load CSS.

2. the difference in the loading sequence is that when link loads CSS, It is a parallel method (no attempt is made to load CSS), while @ import loads the CSS only after the whole page is loaded.

3. Differences in compatibility, because @ import is unique to css2.1, it is ineffective for browsers that are not compatible with css2.1.

4. In terms of style control (for example, when a page layout is dynamically changed, JavaScript is used to operate the DOM), @ import is powerless.

 

 

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.