如果我理解正确的话,您可以通过将过渡移动到链接而不是悬停状态来做同样的事情:
ul li a {
color:#999;
transition: color 0.5s linear; /* vendorless fallback */
-o-transition: color 0.5s linear; /* opera */
-ms-transition: color 0.5s linear; /* IE 10 */
-moz-transition: color 0.5s linear; /* Firefox */
-webkit-transition: color 0.5s linear; /*safari and chrome */
}
ul li a:hover {
color:black;
cursor: pointer;
}
http://jsfiddle.net/spacebeers/sELKu/3/
悬停的定义是:
:悬停 Select 器用于在鼠标悬停时 Select 图元
根据这个定义,悬停的对立面是鼠标悬停在其上方的任何点.比我聪明得多的人完成了这篇文章,在两个州设置了不同的转换-http://css-tricks.com/different-transitions-for-hover-on-hover-off/
#thing {
padding: 10px;
border-radius: 5px;
/* HOVER OFF */
-webkit-transition: padding 2s;
}
#thing:hover {
padding: 20px;
border-radius: 15px;
/* HOVER ON */
-webkit-transition: border-radius 2s;
}