在jsp页面,当选中文字后,怎么让文字的颜色改变,如图,想让文字的颜色从黑色变为蓝色:
用css,如baidu
css这样写:
a.hover-red:hover{color:red;}
a:visited {
font-size: 50px;
color: blank;
font-family: 宋体;
text-align: left;
text-decoration: underline;
TEXT-DECORATION:none;
}
//这个是单击不松开的鲜果
a:active {
color: blue;
text-decoration: none;
}
你试一下
.astyle:visited {
font-size: 50px;
color: blank;
font-family: 宋体;
text-align: left;
text-decoration: underline;
TEXT-DECORATION:none;
}
.astyle:active {
color: blue;
text-decoration: none;
}
.bstyle:visited {
font-size: 50px;
color: blank;
font-family: 宋体;
text-align: left;
text-decoration: underline;
TEXT-DECORATION:none;
}
.bstyle:active {
color: green;
text-decoration: none;
}
我试过了,是不一样的效果的,如果第二个链接不想要这个样式 你就把class去掉就可以了。不懂的可以问我
<html>
<body>
<head>
<meta charset="utf-8">
<link href="bian.css" type="text/css" rel="stylesheet" />
</head>
<a class="astyle">百度</a>
<a class="bstyle">沈雪冰</a>
</body>
</html>
下面这个方法简便易用
在css中加入:
::selection { /* WebKit Browsers */
background: #0000FF;
}
对不起,刚注意到您是想要蓝色文字,那应该是:
::selection {
color: blue;
}
给这个文字加个标签比如
点播课程
加个font标签,,标签里面加属性,,color=''................标签发不出去,尴尬
链接: https://pan.baidu.com/s/1nvSFJw1 密码: n5r3 不是这种效果吗?