This article is a mirror article of machine translation, please click here to jump to the original article.

View: 12867|Reply: 0

[CSS/DIV] The importance of referencing the external stylesheet rel="stylesheet" attribute

[Copy link]
Posted on 10/19/2014 11:08:31 PM | | |

Today I am writing a web page, I need to use CSS styles, and then I want to reference an external stylesheet


Then use the link tag


Then, there was no effect, and at this time, I tested it locally, and I felt that it was a path problem, whether to use an absolute path


Then, after I changed the path of the CSS stylesheet to an absolute path, the page still had no effect


Finally, I opened a random webpage and referenced the link writing method of other websites, and found that I was missing the rel="stylesheet" attribute

At first, I didn't pay much attention to this attribute, because I didn't know what it was for, but finally, I added this attribute, and the effect of the web page was normal!

  1. <link rel="stylesheet" type="text/css" href="#" />
Copy code







Previous:CSS styles are used in a total of 3 Introductions
Next:Today, October 19th, the website has been built for about 15 days, and the post has reached 1,000
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com