bootstrap col-md-offset不工作?

ash*_*kid 3 css twitter-bootstrap

我正在使用反应并尝试渲染以下内容:

render(){
return(
  <div className="col-md-12">
    <h1 className="col-md-6 col-md-offset-6">To do App</h1>


    <form onSubmit={this.handleSubmit}>
      <input onChange={this.handleChange} value={this.state.text}/>
      <button>Add {this.state.items.length+1}</button>
    </form>


    <Todolist items={this.state.items}/> 
  </div>
)
}
Run Code Online (Sandbox Code Playgroud)

col-md-6正在工作,但col-md-offset-6不工作?我正在使用bootstrap 4.

Rob*_*ert 9

.col-*-offset-*已在Bootstrap 4中删除.新语法很简单.offset-*-*,您应该.offset-md-6在上面的代码中使用.

您可以在4.x文档中了解有关抵消Bootstrap网格列的更多信息:

https://getbootstrap.com/docs/4.0/layout/grid/#offsetting-columns