react的使用问题
使用react,创建网页并进行编辑。
在页面中使用class类式组件来组织文本内容。
要求如下:
1.让指定的文本做显示/ 隐藏的渐变动画,文本内容为“今天天气晴朗/下雨”;
2.点击“开始变化”从完全可见,到彻底消失耗时2S,消失之后,能够立马重新显示;
3.点击“再见”按钮从界面中卸载组件。
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>