使用React编写时,记得要引入相应的js库
1、react.js : React核心库
2、react-dom.js:提供操作DOM的React扩展库
3、babel.min.js:解析JSX语法代码转为JS代码的库
React依赖包引入时:注意引入顺序不能乱
css相关内容:
html,
body {
height: 100%;
width: 100%;
margin: 0;
padding: 0
}
#root {
height: 100%;
width: 100%
}
.car-box {
height: 100%;
width: 100%;
overflow: hidden;
}
.box {
text-align: center;
height: 100%;
width: 100vw;
background-color: rgba(7, 241, 191, 0.901);
position: relative;
left: 0;
top: 0;
}
.car,
.con-txt {
text-align: center;
position: absolute;
margin: auto;
width: 100%;
height: 50px;
line-height: 50px;
/* background-color: #09c; */