# 页面的进场和离场 - order: 5 页面的进场和离场。 --- ````jsx var EnterAnimation = antd.EnterAnimation; var Button = antd.Button; var Test = React.createClass({ getInitialState() { return { show: true, enter:{ type:'right', ease:'cubic-bezier(0.19, 1, 0.22, 1)' }, leave:{ type:'left', ease:'cubic-bezier(0.455, 0.03, 0.515, 0.955)', reverse:true, interval:0.05 } } }, onClick() { this.setState({ show: !this.state.show }) }, render() { return (
{this.state.show ?
logo
我是标题
我是标题
: null}
); } }); React.render( , document.getElementById('components-enter-animation-demo-page')); ````