<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=uft-8"> <title>重要性</title> <style type="text-css"> p{color:red!important;}/*!important要写在分号的前面;!important权值最大!*/ P{color:green;} #Setpink{color:pink;|} </style> </head> <body> <p>选不中我,选不中我,我不会变色</p> <div id="Setpink"> <tbody> <table> <tr> <td>wo</td> <td>ai</td> <td>ni</td> </tr> <tr> <td>ni</td> <td>ai</td> <td>wo</td> <td>me</td> </tr> </table> </tbody> </div> </body> </html>
我看了半天没看出错在哪里,大佬们帮我看一哈
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>重要性</title>
<style type="text/css">
p{color:red!important;}/*!important要写在分号的前面;!important权值最大!*/
P{color:green;}
#Setpink{color:pink;|}
</style>
</head>
<body>
<p>选不中我,选不中我,我不会变色</p>
<div id="Setpink">
<tbody>
<table>
<tr>
<td>wo</td>
<td>ai</td>
<td>ni</td>
</tr>
<tr>
<td>ni</td>
<td>ai</td>
<td>wo</td>
<td>me</td>
</tr>
</table>
</tbody>
</div>
</body>
</html>
#Setpink{color:pink;|}后面的竖线是什么意思?
text-css改成text-css uft小写弄成UFT大写
<style type="text-css">改为<style type="text/css">
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=uft-8">
<title>重要性</title>
<style type="text-css">
p{color:red!important;}/*!important要写在分号的前面;!important权值最大!*/
P{color:green;}
#Setpink{color:pink;|}
</style>
</head>
<body>
<p>选不中我,选不中我,我不会变色</p>
<div id="Setpink">
<tbody>
<table>
<tr>
<td>wo</td>
<td>ai</td>
<td>ni</td>
</tr>
<tr>
<td>ni</td>
<td>ai</td>
<td>wo</td>
<td>me</td>
</tr>
</table>
</tbody>
</div>
</body>
</html>