我有一个表格,表格中的不同字段将根据标志是否翻转而改变字体颜色。我有几个不同颜色的旗子,可以随时翻转。
我希望将鼠标悬停在具有由标志导致的异常名称的文本上,并使用与标志相同的颜色。
(我最初打算在名称旁边添加一个小方块的颜色,但在悬停时这似乎很困难/不可能,所以现在我只想更改文本的颜色)。
我不能让它工作。帮助?
我的标志是:
flag1, if true then the field shows in red for exception1
flag2, if true then the fields shows in blue for exception2
flag3, if true th
使用CSS,当您将鼠标悬停在链接上时,可以很容易地将自定义颜色应用于该链接,方法是:
.myId:hover{
color:green;
}
但是,样式标签又如何呢?可以按照以下方式做一些事情:
<a style="*insert nifty markup here to change color on hover*" href="somewhere.html">text</a>
或者只可能通过第一种方法改变悬停颜色(仅使用html/css,不允许javascript )。
非常容易阅读小样本代码,以演示该函数的问题。
(http://jsfiddle.net/gKfGw/)!
/*for the hovering over any item in the menu*/
$('.navy').hover(
function() {
$(this).css({"border-bottom " : "2px solid #13B213"}); /*green*/
},
function() {
$(this).css({"border-bottom