Css 引导col md偏移量不工作?

Css 引导col md偏移量不工作?,css,twitter-bootstrap,Css,Twitter Bootstrap,我正在使用react并尝试渲染以下内容: 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={thi

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

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>
)
}
render(){
返回(
待办应用
添加{this.state.items.length+1}
)
}

col-md-6正在工作,但col-md-offset-6不工作??我正在使用引导程序4。

.col-*-offset-*
已在引导程序4中删除。新语法只是
.offset-*-*
,因此您应该在上述代码中使用
.offset-md-6

您可以在其4.x文档中了解有关偏移引导的网格列的更多信息:


您必须将offset的格式更改为
offset-md-6
而不是
col-md-offset-6


Bootstrap 3支持格式
col--offset-*
,但在Bootsrap 4中,格式类似于
offset--*

,为什么使用col-md-12?以确保总共有12列