0
我目前正在编辑reddit.com上的subreddit,并且我的方法受限于仅限于CSS。 当您将鼠标悬停在左侧的菜单上时,我设法获得叠加效果。它正在消失,但我不知道如何淡出它。由于转换不起作用我尝试了另一种动画方法。使覆盖缓慢淡出?
TL; DR:覆盖淡入:是 - 淡出:不:(
下面是我使用的代码的某些部分:
#sr-header-area .drop-choices:hover:before {
content: "";
font-size: 13px;
display: block;
position: fixed !important;
height: 100%;
width: 100%;
margin-left: 300px;
pointer-events: none;
z-index: 700 !important;
animation: fade 0.5s ease;
-webkit-animation-fill-mode: forwards;
animation-fill-mode: forwards;}
@keyframes fade {
0% {background-color: rgba(0, 0, 0, 0);}
100% {background-color: rgba(0, 0, 0, 0.4);}}
也许有人可以帮助我在这里
谢谢!这真的起作用了! :) – Cello