mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-23 01:45:05 +08:00
Fix badge style in Maxthon, close #5477
This commit is contained in:
parent
041bbee2c0
commit
ee2f025585
@ -1,7 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { createElement, Component } from 'react';
|
import { createElement, Component } from 'react';
|
||||||
import { findDOMNode } from 'react-dom';
|
|
||||||
import isCssAnimationSupported from '../_util/isCssAnimationSupported';
|
|
||||||
import assign from 'object-assign';
|
import assign from 'object-assign';
|
||||||
import omit from 'omit.js';
|
import omit from 'omit.js';
|
||||||
|
|
||||||
@ -40,12 +38,6 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
|
||||||
if (!isCssAnimationSupported()) {
|
|
||||||
findDOMNode(this).className += ' not-support-css-animation';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getPositionByNum(num, i) {
|
getPositionByNum(num, i) {
|
||||||
if (this.state.animateStarted) {
|
if (this.state.animateStarted) {
|
||||||
return 10 + num;
|
return 10 + num;
|
||||||
@ -109,6 +101,7 @@ export default class ScrollNumber extends Component<ScrollNumberProps, any> {
|
|||||||
className: `${this.props.prefixCls}-only`,
|
className: `${this.props.prefixCls}-only`,
|
||||||
style: {
|
style: {
|
||||||
transition: removeTransition && 'none',
|
transition: removeTransition && 'none',
|
||||||
|
msTransform: `translateY(${-position * 100}%)`,
|
||||||
WebkitTransform: `translateY(${-position * 100}%)`,
|
WebkitTransform: `translateY(${-position * 100}%)`,
|
||||||
transform: `translateY(${-position * 100}%)`,
|
transform: `translateY(${-position * 100}%)`,
|
||||||
},
|
},
|
||||||
|
@ -123,21 +123,12 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
&-only {
|
&-only {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
transition: transform .3s @ease-in-out;
|
transition: all .3s @ease-in-out;
|
||||||
height: @badge-height;
|
height: @badge-height;
|
||||||
> p {
|
> p {
|
||||||
height: @badge-height;
|
height: @badge-height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// for IE8/9 display
|
|
||||||
&.not-support-css-animation &-only {
|
|
||||||
> p {
|
|
||||||
display: none;
|
|
||||||
&.current {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes antZoomBadgeIn {
|
@keyframes antZoomBadgeIn {
|
||||||
|
Loading…
Reference in New Issue
Block a user