css代码是放在html代码的哪个位置

在head里面 1.直接写在头上style里面,一大段,例:body,td,th { font-family: "宋体";font-size: 12px;line-height: 120%;} body { margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;} 2.外部连接
css代码是放在html代码的哪个位置
在head里面
1.直接写在头上style里面,一大段,例:
body,td,th {
font-family: "宋体";
font-size: 12px;
line-height: 120%;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
2.外部连接
<link href="css/css代码.css" rel="stylesheet" type="text/css">
"css/css代码.css"是读取同级目录CSS下的<css代码.css>
css代码文件.
"../css/css代码.css"是读取上级目录CSS下的<css代码.css>
css代码文件.以次类推.
还可以加载网络CSS,这鸟事俺们做网站的一般不干2016-12-27
mengvlog 阅读 56 次 更新于 2025-10-31 15:38:03 我来答关注问题0
檬味博客在线解答立即免费咨询

CSS相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部