求助:(CSS)如果让第二个文本,显示为红色?
- 提问者网友:感性作祟
- 2021-07-19 01:25
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
a:link {
color: #FF00FF;
}
a:visited {
color: #FF00FF;
}
.STYLE1 {color: #FF0000}
-->
</style>
</head>
<body>
<p><a href="#">中国</a></p>
<p><a href="#" class="STYLE1">中国</a></p>
</body>
</html>
- 五星知识达人网友:未来江山和你
- 2021-07-19 02:24
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
a:link {
color: #0000FF;
}
a:visited {
color: #FF00FF;
}
a.STYLE1 {color: #FF0000}
-->
</style>
</head>
<body>
<p><a href="#">中国</a></p>
<p><a href="#" class="STYLE1">中国</a></p>
</body>
</html>
- 1楼网友:老鼠爱大米
- 2021-07-19 07:29
最简单的就是把你这句
.STYLE1 {color: #FF0000}
改为:
a.STYLE1 {color: #FF0000}
- 2楼网友:渡鹤影
- 2021-07-19 06:53
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>无标题文档</title> <style type="text/css"> <!-- a:link { color: #FF00FF; } a:visited { color: #FF00FF; } a.STYLE1:link{ color: #FF0000; } a.STYLE!:hover{ color:#F00; } --> </style> </head>
<body> <p><a href="#">中国</a></p> <p><a href="#" class="STYLE1">中国</a></p> </body> </html>
- 3楼网友:上分大魔王
- 2021-07-19 05:19
- 4楼网友:千杯敬自由
- 2021-07-19 04:47
- 5楼网友:低血压的长颈鹿
- 2021-07-19 03:10