1. 程式人生 > 其它 >javascript中html當中如何引用css檔案

javascript中html當中如何引用css檔案

javascript中html當中如何引用css檔案

1.html當中如何引用css檔案
馬克-to-win:css:Cascading Style Sheets

例 1.1

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<!-- LINK.rel (Property)
The relationship between the current element and the remote document. -->
<link href="outer.css" rel="stylesheet">
</head>
<body>
<table width="190" height="80" border="2" >
<tr>
<td >張三</td>
</tr>
<tr>
<td>qixy</td>
</tr>
<tr>
<td>李四</td>
</tr>
<tr>
<td>王五</td>
</tr>
</table>
</body>
</html>


outer.css:

table {
background-color: #0000ff;

}
td {
/*the following statement make the border to show, because of the different color.*/
background-color: #FF0000;

}

更多內容請見原文,文章轉載自:

https://blog.csdn.net/qq_43650923/article/details/102242672