In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the knowledge of "what is the difference between link and @ import in CSS and HTML". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Difference 1: ancestral differences: link belongs to the XHTML tag, while @ import is entirely a way provided by CSS. The link tag can do many other things besides loading CSS, such as defining RSS, defining rel connection properties, etc. @ import can only load CSS.
Difference 2: difference in loading order: when a page is loaded (that is, when browsed by the viewer), the CSS referenced by link will be loaded at the same time, while the CSS referenced by @ import will wait until the page has been downloaded before it is loaded. So sometimes there will be no style when browsing the page where @ import loads CSS.
Difference 3: difference in compatibility. @ import is proposed by CSS2.1, so the old browsers do not support it. @ import can only be recognized by those above IE5, while the link tag does not have this problem.
Difference 4: the difference when using dom to control styles: when you use javascript to control dom to change styles, you can only use the link tag, because @ import is not controlled by dom.
Html, the full name of html, is a markup language that contains a series of tags. Through these tags, you can unify the format of documents on the network and connect scattered Internet resources into a logical whole. Html text is a descriptive text composed of html commands, and html commands can explain text, graphics, animation, sounds, tables, links, etc. Mainly used with css+js to build elegant front-end web pages.
That's all for the content of "what's the difference between link and @ import in CSS and HTML". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.