react.js-10-渐隐动画

前端之家收集整理的这篇文章主要介绍了react.js-10-渐隐动画前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

var Hello = React.createClass({ getInitialState: function () { return { opacity: 1.0 }; },componentDidMount: function () { this.timer = setInterval(function () { var opacity = this.state.opacity; opacity -= .05; if (opacity < 0.1) { opacity = 1.0; } this.setState({ opacity: opacity }); }.bind(this),100); },render: function () { return (

原文链接:https://www.f2er.com/react/307071.html

猜你在找的React相关文章