鼠标进入,离开,按下,抬起状态


<div class="refresh">刷新</div>

<script>
// 鼠标按下
$('.refresh').mousedown(function () {
$(this).css({
"color": "#2a72f5"
})
})
// 鼠标抬起
$('.refresh').mouseup(function () {
$(this).css({
"color": "#fff"
})
})
// 鼠标进入
$('.refresh').mouseenter(function () {
$(this).css({
"color": "#2a72f5"
})
})
// 鼠标离开
$('.refresh').mouseleave(function () {
$(this).css({
"color": "#fff"
})
})
</script>

原文地址:https://www.cnblogs.com/lljun/p/11726434.html