【发布时间】:2018-06-23 00:17:36
【问题描述】:
我正在制作一个基于 ReactJS 的个人网站。由于这是一个单页应用程序,我想让我的网站有条件地呈现。也就是说,当用户向下滚动以查看不同的section时,Render应该在不同的时间渲染我页面上的每个section在我的页面上,因为我希望我的组件在用户查看此 时动画,而不是在开始时所有这些组件都被动画。
<Section styles='me' id={'top'}>
<img className="background-image" src={require('../img/Sydney.jpg')} />
<Animated animationIn="zoomIn" animationOut="zoomOut" isVisible={true}>
<div><Avatar src={require('../img/me.jpg')} size={200} round={true} /></div>
</Animated>
<h1>Jack Lau</h1>
<h3>Web/Mobile Apps Developer</h3>
<h3 style={{ maxWidth: 480 }}>Core Skills:<br/>Ready for React, Redux, Typescript, ES6, JSX, Babel and Webpack. Objective-C, Android Development, C#, JavaScript, PHP, Database Design</h3>
<div style={{ marginBottom: '30px' }}>
<a href='https://www.linkedin.com/in/jacklau9515/' className='btn-icon' target='_blank'><i className='fa fa-linkedin-square'></i></a>
<a href='https://github.com/Jacklau9515' className='btn-icon' target='_blank'><i className='fa fa-github-square'></i></a>
<a href='https://plus.google.com/u/0/100888601415107489035' className='btn-icon' target='_blank'><i className='fa fa-google-plus-square'></i></a>
</div>
<Animated animationIn="rubberBand" animationOut="zoomOut" isVisible={true}>
<a href='#hire-me' className='btn'>Hire Me!</a>
</Animated>
</Section>
<Section styles='resume'>
<div id={'background'}>
<img className="background-image" src={require('../img/xpic11075_sc115.com.jpg')} />
<h3 className='title'>My Personal Introduction</h3>
<Animated animationIn="fadeInLeft" animationOut="rollOut" animationInDelay="3" isVisible={true}>
<p>I graduated from <a href="http://www.utas.edu.au/" target="_blank"><u>University of Tasmania (UTAS)</u></a> in December 2017 with an undergraduate degree (Bachelor of Information and Communication Technology, Software Development). Participate in the implementation of <a href="https://itunes.apple.com/us/app/dbdc/id1296090690?mt=8" target="_blank"><u>Digitized Bike Data</u></a> Project and served as Leader Software Developer of the team.</p>
<p>I am very detail oriented. You can easily contact me at any hour of the day, and I am enthusiastic and passionate about architectural and design patterns, best practices and cutting-edge technologies.</p>
<p>During my three years of university study, no less than a Distinction (DN) Grade of All my programming-related subjects, especially web programming. The following table shows the scores and descriptions of all my programming subjects:</p>
</Animated></Section>
注意:Animated 是一个 React 组件,用于使用 Animated.css 显示或隐藏带有动画的元素。
【问题讨论】:
-
欢迎来到 Stack Overflow。 SO的意思是让人们寻求帮助,礼节是你自己动手,人会帮你完成任务。你可以在这里阅读更多信息stackoverflow.com/help/how-to-ask