我已经放了css动画下拉菜单,你可以在这里看到:
/* CSS used here will be applied after bootstrap.css */
.dropdown .dropdown-menu {
animation-name: example;
animation-duration: 1s;
}
@keyframes example {
from {
transform: scale(0);
opacity: 0;
-webkit-transition: all .2s linear;
-o-transition: all
我试图创建“下拉菜单”的反应。我在onMouseEnter和onMouseLeave事件中使用了onMouseLeave内部函数(在下拉列表持有者-us div /NaviMain中)来切换“下拉菜单”的display。最后一件事是在单击DropdownMenuItem.时使“下拉菜单”消失。有人能告诉我如何做到这一点吗?
App.js
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import NaviMain from "./components/NaviMain