新手上路,求大神解答:为什么my.css中的文件选择器对css1l中span中的内容毫无作用?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html>
<head>
<title>css1l</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<link rel="stylesheet" href="../../webroot/WebRoot/my.css" type="text/css"></link>
</head>
<body>
<span class="style1">栏目一</span><br/>
<span class="style2">栏目二</span><br/>
<span class="style1">栏目三</span><br/>
<span class="style2">栏目四</span><br/>
<span class="style1" id="style2">栏目五</span><br/>
<a href="#">goto soho</a><br/>
<a href="#">goto sina</a><br/>
</body>
</html>
my.css
.style1{
font-size:30px;
color:black;
}
#style2{
font-size:60px;
color:black;
}
body{
font-weight:bold;
background color:black;
}
a:link{
color:black;
test-decoration:none;
}
a:hover{
test-decoration:underline;
}
运行结果!
栏目一
栏目二
栏目三
栏目四
栏目五
goto soho
goto sina