外部样式表是否需要 `<style>` 标签?
外部样式内容不需要使用 <style> 标签是对的。外部样式表使用 link 标签来引用,在外部样式表文件中不需要使用 <style> 标签。例如:
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
style.css 文件中只需包含样式规则,无需添加 <style> 标签:
body {
background-color: lightblue;
}
h1 {
color: navy;
}
原文地址: http://www.cveoy.top/t/topic/mI9P 著作权归作者所有。请勿转载和采集!