因此,点击'KH'标志时,我有一个菜单从左侧推出。当'KH'悬停时,它变成浅灰色。在菜单打开的情况下保持链接处于非活动状态
点击'KH'后,用户移动鼠标就会回到黑色的活动状态。
在菜单打开的整个过程中,有没有一种方法可以将“KH”保持为这种较浅的灰色,并且只有在用户关闭菜单后才会回到黑色?
HTML:
<div class="logo"><button class="one toggle-menu menu-left push-body">KH</button></div>
CSS:
button.one {
border : 0px;
background: #f4f4f4;
font-family: "bebas-neue", sans-serif;
font-size: 3em;
color: #272727;
font-weight: 400;
padding-bottom: 15px;
letter-spacing: 1px;
text-decoration: none;
-webkit-transition: all 0.8s ease-in-out;
-moz-transition: all 0.8s ease-in-out;
-o-transition: all 0.8s ease-in-out;
transition: all 0.8s ease-in-out;
cursor: pointer;
}
button.one:active { color: #ccc; }
button.one:hover { color: #ccc; cursor: pointer; }
网站:http://kaye.at/babyboom.php
我更新了我的答案,它的工作原理 - 检查[小提琴](http://jsfiddle.net/robschmuecker/dcRZA/1/) –