如何使用纯css制作反弹动画效果
下面的代码运行良好,问题是我不想使用整个包,因为我只需要几个类, 所以我检查并复制了我页面上的类作用域,但它并没有按预期工作如何使用纯css制作反弹动画效果,css,reactjs,sass,react-toastify,Css,Reactjs,Sass,React Toastify,下面的代码运行良好,问题是我不想使用整个包,因为我只需要几个类, 所以我检查并复制了我页面上的类作用域,但它并没有按预期工作 import 'react-toastify/dist/ReactToastify.css' import 'animate.css/animate.min.css' const bounce = cssTransition({ enter: 'animate__animated animate__bounceIn',//this should be source
import 'react-toastify/dist/ReactToastify.css'
import 'animate.css/animate.min.css'
const bounce = cssTransition({
enter: 'animate__animated animate__bounceIn',//this should be source code
exit: 'animate__animated animate__bounceOut',
})
const App = () => {
return (
<>
<ToastContainer
position="top-center"
autoClose={4000}
transition={bounce}
hideProgressBar
newestOnTop={false}
closeOnClick
rtl={false}
pauseOnHover
/>
是否包含反弹
关键帧
?@prettyInPink是关键帧和反弹类
const bounce = cssTransition({
enter: '-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-duration:var(--animate-duration);animation-duration:var(--animate-duration);-webkit-animation-fill-mode:both;animation-fill-mode:both',
exit: 'animate__animated animate__bounceOut',
})