<form className="pure-form">
<fieldset>
<input ref="email" type="email" placeholder="Email"
value={this.state.emailInput}
onChange={this.handleChange}
/>
<input ref="password" type="password" placeholder="Password"
value={this.state.passwordInput}
onChange={this.handleChange}
/>
<label htmlFor="remember">
<input ref="remember" id="remember" type="checkbox" /> Remember me?
</label>
<button onClick={this.handleLoginClick} type="submit" className="pure-button pure-button-primary">Sign in</button>
</fieldset>
</form>
我只是从Purecss.io复制粘贴示例表单。 为什么一切都在一起?为什么他们没有保证金?
答案 0 :(得分:2)
您错误地添加了类:
<form className="pure-form">
应该是
<form class="pure-form">
......等等。
<link href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css" rel="stylesheet" />
<form class="pure-form">
<fieldset>
<input red="email" type="email" placeholder="Email" />
<input ref="password" type="password" placeholder="Password" />
<label htmlFor="remember">
<input ref="remember" id="remember" type="checkbox" />Remember me?
</label>
<button onClick={this.handleLoginClick} type="submit" class="pure-button pure-button-primary">Sign in</button>
</fieldset>
</form>
&#13;
答案 1 :(得分:0)
如果你想在任何html标签上调用任何css类,那么Paulie_D是正确的,那么你需要遵循这样的语法
<tag class="classname"></tag>
Eg:
<form class="pure-form">
form elements goes here
</form>