css 错误检查
<html><head><title>CSS</title><styletype="text/css"><!--.STYLE1{color:white;font-size...
<html>
<head>
<title>CSS</title>
<style type ="text/css">
<!--
.STYLE1 {
color: white;
font-size:36px;
font-family: "Times New Roman", Times, serif;
}
.STYLE1 {background-color:red}
.STYLE1 {width:50px}
.STYLE1 {letter-spacing:10px}
.STYLE1 {border:blue solid 5px}
.STYLE1 {colour:yellow
background-colour:#55555;
width:100px}
.STYLE1 a:hover{colour:black
background-colour:#99999;
width:100px}
body {
background-color:;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<h1 align="left" class="STYLE1">HELLO</h1>
</body>
</html>
问什么点击后才变颜色 不是停留时变颜色 展开
<head>
<title>CSS</title>
<style type ="text/css">
<!--
.STYLE1 {
color: white;
font-size:36px;
font-family: "Times New Roman", Times, serif;
}
.STYLE1 {background-color:red}
.STYLE1 {width:50px}
.STYLE1 {letter-spacing:10px}
.STYLE1 {border:blue solid 5px}
.STYLE1 {colour:yellow
background-colour:#55555;
width:100px}
.STYLE1 a:hover{colour:black
background-colour:#99999;
width:100px}
body {
background-color:;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<h1 align="left" class="STYLE1">HELLO</h1>
</body>
</html>
问什么点击后才变颜色 不是停留时变颜色 展开
展开全部
你的代码写的确实有点凌乱,有不少错误,我不一一指出了,你对比一下就是了。
下面是改过的代码,应该能解决你的问题。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style type ="text/css">
<!--
body {
background-color:#fff;
}
.STYLE1 {
color: white;
font-size:36px;
font-family: "Times New Roman", Times, serif;
background-color:red;
letter-spacing:10px;
border:blue solid 5px;
}
.STYLE1 a:link,.STYLE1 a:visited{
color:yellow;
background-colour:#55555;
width:100px;
}
.STYLE1 a:hover,.STYLE1 a:active{
color:black;
background-colour:#99999;
width:100px;
}
-->
</style>
<body>
<h1 align="left" class="STYLE1"><a href="#">HELLO</a></h1>
</body>
</html>
下面是改过的代码,应该能解决你的问题。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style type ="text/css">
<!--
body {
background-color:#fff;
}
.STYLE1 {
color: white;
font-size:36px;
font-family: "Times New Roman", Times, serif;
background-color:red;
letter-spacing:10px;
border:blue solid 5px;
}
.STYLE1 a:link,.STYLE1 a:visited{
color:yellow;
background-colour:#55555;
width:100px;
}
.STYLE1 a:hover,.STYLE1 a:active{
color:black;
background-colour:#99999;
width:100px;
}
-->
</style>
<body>
<h1 align="left" class="STYLE1"><a href="#">HELLO</a></h1>
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询