Kha*_*ran 4 reactjs semantic-ui semantic-ui-react
我正在使用 Reactjs 项目,并且我使用 Semantic UI React 来美化Input. 但是,似乎Input总是以默认大小显示。如何调整其水平宽度?
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.12/semantic.min.css"></link>
import { Input } from 'semantic-ui-react';
<Input value={this.state.firstName} onChange={this.handleInputFirstName}/>
添加style={{ width:"300px" }}对我来说非常好。我正在使用与您相同的样式表。你可以看看下面的代码:
const App = () => (
<div style={styles}>
<h2>Start editing width and see magic happen {'\u2728'}</h2>
<Input placeholder="Hello there" style={{width: "370px"}}/>
</div>
);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
21201 次 |
| 最近记录: |