从技术上讲,你可以将样式您想要的位置。 不过, HTML规范的建议,将他们放在文件头标记。 主要的好处是,您的网页加载速度似乎更快一些。
<head> <title>应把所有CSS样式都放在Head Tag</title> <link rel="stylesheet" type="text/css" media="screen" href="path/web。com/file.css" /> <link rel="stylesheet" type="text/css" media="screen" href="path/web。com/anotherFile.css" /> </head> | |