老师您好,在 5-3 节中,我将 marginTop 设置为 10px 之后,结果别没有显示 10px 的上边距,如下图所示:
我的代码如下,希望得到老师的解答,谢谢!
import React, { Component } from 'react';
import 'antd/dist/antd.css';
import { Input, Button } from 'antd';
class TodoList extends Component {
render() {
return (
<div style={{marginTop: '10px', marginLeft: '10px'}}>
<div>
<Input placeholder="请输入" style={{width: '300px', marginRight: '10px'}} />
<Button type="primary">提交</Button>
</div>
</div>
)
}
}
export default TodoList;