我写了前缀,至少在我眼里是这样。动画不工作在Chrome或mozilla。codepen上的代码工作得很好,但是当我为我的网站复制并粘贴style.css文件并运行它时,它就是不起作用。
li:hover > ul.drop-menu li {
opacity: 0;
-webkit-animation-name: menu1;
-moz-animation-name: menu1;
animation-name: menu1;
-webkit-animation-duration: 1s;
-moz-animation-duration: 1s;
animation-duration: 1s;
-webkit-animation-timing-function: ease-in-out;
-moz-animation-timing-function: ease-in-out;
animation-timing-function: ease-in-out;
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
@-webkit-keyframes menu1 {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@-moz-keyframes menu1 {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes menu1 {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}