mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06: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 {
|
@keyframes pageEnter {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router';
|
||||||
import ScrollElement from 'rc-scroll-anim/lib/ScrollElement';
|
import ScrollElement from 'rc-scroll-anim/lib/ScrollElement';
|
||||||
import TweenOne from 'rc-tween-one';
|
|
||||||
import GitHubButton from 'react-github-button';
|
import GitHubButton from 'react-github-button';
|
||||||
import 'react-github-button/assets/style.css';
|
import 'react-github-button/assets/style.css';
|
||||||
import { Icon } from 'antd';
|
import { Icon } from 'antd';
|
||||||
@ -33,9 +32,7 @@ export default class Banner extends React.Component {
|
|||||||
<GitHubButton key="github-button" type="stargazers"
|
<GitHubButton key="github-button" type="stargazers"
|
||||||
namespace="ant-design" repo="ant-design" />
|
namespace="ant-design" repo="ant-design" />
|
||||||
</QueueAnim>
|
</QueueAnim>
|
||||||
<TweenOne className="down" animation={{ y: 10, duration: 800, yoyo: true, repeat: -1 }}>
|
<Icon type="down" className="down" />
|
||||||
<Icon type="down" />
|
|
||||||
</TweenOne>
|
|
||||||
</ScrollElement>
|
</ScrollElement>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
|
@ -85,6 +85,9 @@ export default class Home extends React.Component {
|
|||||||
#footer a {
|
#footer a {
|
||||||
color: #eee;
|
color: #eee;
|
||||||
}
|
}
|
||||||
|
.down {
|
||||||
|
animation: upDownMove 1.2s ease-in-out infinite;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user