方法1

使用import 方法引用CSS
 <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>控制DOM对象</title>
<style type="text/css" >
@import url(../CSS/1-3.css); /*使用import 方法引用CSS*/
</style>
<script type="text/javascript" src="../JQuery/jquery-2.1.4.min.js">
</script>
</head>

方法2

使用link引用CSS
 <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JQuery事件的链式写法</title>
<link type="text/css" rel="stylesheet" href="../CSS/1-2.css" /> <!-- 使用link引用CSS -->
<script type="text/javascript" src="../JQuery/jquery-2.1.4.min.js">
</script>
<script type="text/javascript"> </script>
</head>

方法3

直接将CSS代码写在HTML页面 ,格式如下:

 <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">
.divFrame {
width: 260px;
border: solid 1px #666;
font-size: 10pt;
} .divTitle {
background-color: #666;
padding: 5px;
} .divContent {
padding: 5px;
display: none;
} .divCurrColor {
background-color: red;
}
</style>
</head>
<body>
</body>
</html>
05-06 07:28