javascript - 菜单出现和消失,过渡效果
问题描述
当我按下菜单更改语言时,如何获得菜单出现和消失的效果?如图所示:https://wieldy.g-axon.work/main/dashboard/crypto
在这里演示:https ://stackblitz.com/edit/react-bagqa9
import Select from 'react-select'
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' }
]
class App extends Component {
constructor() {
super();
this.state = {
name: 'React'
};
}
render() {
return (
<Select
options={options}
classNamePrefix='my-className-prefix'
/>
);
}
}
解决方案
React Select 使用可用于覆盖现有 css 的覆盖值。您需要找到弹出框的 CSS 值并使用关键帧来获取该动画。
推荐阅读
- git - 将“修复”提交重新设置为先前的合并提交
- python - 在 pyspark 中的简单 .first()、.count() 中出现错误,
- oracle-apex - 如何根据不同的表和列在 apex oracle 中创建 IR
- c# - 为什么 .NET HttpResponseMessage.Content 读取方法是异步的?
- python - Pip List 显示奇怪的包/名称
- sql-server - 将 nvarchar 转换为日期时间时出现异常
- python - 导入guesslang包时的ContextualVersionConflict
- python - 使用当前正在运行的进程连接到正在运行的 Jupyter 内核
- cookies - AWS 应用程序负载均衡器规则不适用于 cookie?可能出了什么问题?
- c# - 蛇。回滚蛇的坐标进行冲击