mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-05 23:46:28 +08:00
use css animation for perf
This commit is contained in:
parent
137f9071ac
commit
abfbcee034
@ -262,6 +262,18 @@ a {
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes upDownMove {
|
||||
0% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-6px);
|
||||
}
|
||||
100% {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes pageEnter {
|
||||
from {
|
||||
opacity: 0;
|
||||
|
@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router';
|
||||
import ScrollElement from 'rc-scroll-anim/lib/ScrollElement';
|
||||
import TweenOne from 'rc-tween-one';
|
||||
import GitHubButton from 'react-github-button';
|
||||
import 'react-github-button/assets/style.css';
|
||||
import { Icon } from 'antd';
|
||||
@ -33,9 +32,7 @@ export default class Banner extends React.Component {
|
||||
<GitHubButton key="github-button" type="stargazers"
|
||||
namespace="ant-design" repo="ant-design" />
|
||||
</QueueAnim>
|
||||
<TweenOne className="down" animation={{ y: 10, duration: 800, yoyo: true, repeat: -1 }}>
|
||||
<Icon type="down" />
|
||||
</TweenOne>
|
||||
<Icon type="down" className="down" />
|
||||
</ScrollElement>
|
||||
</section>
|
||||
);
|
||||
|
@ -85,6 +85,9 @@ export default class Home extends React.Component {
|
||||
#footer a {
|
||||
color: #eee;
|
||||
}
|
||||
.down {
|
||||
animation: upDownMove 1.2s ease-in-out infinite;
|
||||
}
|
||||
`;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user