Twitter bootstrap 引导col-sm-6图像大小调整div

Twitter bootstrap 引导col-sm-6图像大小调整div,twitter-bootstrap,Twitter Bootstrap,使用col-sm-6时,我无法将图片与方框文本对齐。我不确定这是否是图像或边距/填充等问题 html: /*css:*/ .类别{ 垫面:3rem; 垫底:3rem; 背景色:#096; } .类别{ 显示:块; 高度:487px; 最大宽度:100%; } .categorytext{ 垫面:12%; 字体系列:Avenir; 颜色:#0670EB; 字体大小:粗体; 背景色:白色; 宽度:50%; 高度:487px; 浮动:对; } .categorytext1{ 垫面:12%; 字体系

使用col-sm-6时,我无法将图片与方框文本对齐。我不确定这是否是图像或边距/填充等问题

html:

/*css:*/
.类别{
垫面:3rem;
垫底:3rem;
背景色:#096;
}
.类别{
显示:块;
高度:487px;
最大宽度:100%;
}
.categorytext{
垫面:12%;
字体系列:Avenir;
颜色:#0670EB;
字体大小:粗体;
背景色:白色;
宽度:50%;
高度:487px;
浮动:对;
}
.categorytext1{
垫面:12%;
字体系列:Avenir;
颜色:#0670EB;
字体大小:粗体;
背景色:白色;
宽度:50%;
高度:487px;
浮动:左;
}

语言

Nibook是一个平台,外国人可以通过制作精美的服务将其帧时间转换为金钱,并与当地人亲自或在线分享


.categorytext1
正在更改div的宽度,这很可能会影响到
col-sm-6

.categorytext1 {
    padding-top:12%;
    font-family: Avenir;
    color:#0670EB;
    font-weight:bold;
    background-color:white;
    *****width:50%;*****
    height:487px;
    float:left;
}

.categorytext1
正在更改div的宽度,这很可能会干扰
col-sm-6的引导样式

.categorytext1 {
    padding-top:12%;
    font-family: Avenir;
    color:#0670EB;
    font-weight:bold;
    background-color:white;
    *****width:50%;*****
    height:487px;
    float:left;
}
使用此代码:

 <div class="container-fluid">
  <div class="container">
   <div class="row">
    <div class="col-sm-6 pad0">
     <img src="http://ingridwu.dmmdmcfatter.com/wp-content/uploads/2015/01/placeholder.png" class="categoryimg" alt="Generic placeholder image">
    </div>
    <div class="col-sm-6 pad0">
     <div class="categorytext1">
      <h2>LANGUAGE</h2>
      <p class="lead">Nibook is a platform where foreigners can change their frame time into money by crafting beautiful services and share them with the locals within in-person or online experiences.</p>
     </div>
    </div>
   </div>
   <div class="row">
    <div class="row">
    <div class="col-sm-6 col-sm-push-6 pad0">
     <img src="http://ingridwu.dmmdmcfatter.com/wp-content/uploads/2015/01/placeholder.png" class="categoryimg" alt="Generic placeholder image">
    </div>
    <div class="col-sm-6 col-sm-pull-6 pad0">
     <div class="categorytext1">
      <h2>LANGUAGE</h2>
      <p class="lead">Nibook is a platform where foreigners can change their frame time into money by crafting beautiful services and share them with the locals within in-person or online experiences.</p>
     </div>
    </div>
   </div>
  </div>
 </div>
<style>
body{
    background: #f5f5f5;
}
.pad0{
    padding: 5px;
    margin-bottom: 5px;
}

.category {
  padding-top: 3rem;
  padding-bottom: 3rem;
  background-color: #096;
}

.categoryimg {
    display:block;
    height:487px;
    max-width:100%;

}

.categorytext1 {
padding: 0 15px;
padding-top:12%;
font-family: Avenir;
color:#0670EB;
font-weight:bold;
background-color:white;
height:487px;
float:left;
}
</style>

语言

Nibook是一个平台,外国人可以通过制作精美的服务将其帧时间转换为金钱,并与当地人亲自或在线分享

语言

Nibook是一个平台,外国人可以通过制作精美的服务将其帧时间转换为金钱,并与当地人亲自或在线分享

身体{ 背景:#f5; } .pad0{ 填充物:5px; 边缘底部:5px; } .类别{ 垫面:3rem; 垫底:3rem; 背景色:#096; } .类别{ 显示:块; 高度:487px; 最大宽度:100%; } .categorytext1{ 填充:0 15px; 垫面:12%; 字体系列:Avenir; 颜色:#0670EB; 字体大小:粗体; 背景色:白色; 高度:487px; 浮动:左; }
使用以下代码:

 <div class="container-fluid">
  <div class="container">
   <div class="row">
    <div class="col-sm-6 pad0">
     <img src="http://ingridwu.dmmdmcfatter.com/wp-content/uploads/2015/01/placeholder.png" class="categoryimg" alt="Generic placeholder image">
    </div>
    <div class="col-sm-6 pad0">
     <div class="categorytext1">
      <h2>LANGUAGE</h2>
      <p class="lead">Nibook is a platform where foreigners can change their frame time into money by crafting beautiful services and share them with the locals within in-person or online experiences.</p>
     </div>
    </div>
   </div>
   <div class="row">
    <div class="row">
    <div class="col-sm-6 col-sm-push-6 pad0">
     <img src="http://ingridwu.dmmdmcfatter.com/wp-content/uploads/2015/01/placeholder.png" class="categoryimg" alt="Generic placeholder image">
    </div>
    <div class="col-sm-6 col-sm-pull-6 pad0">
     <div class="categorytext1">
      <h2>LANGUAGE</h2>
      <p class="lead">Nibook is a platform where foreigners can change their frame time into money by crafting beautiful services and share them with the locals within in-person or online experiences.</p>
     </div>
    </div>
   </div>
  </div>
 </div>
<style>
body{
    background: #f5f5f5;
}
.pad0{
    padding: 5px;
    margin-bottom: 5px;
}

.category {
  padding-top: 3rem;
  padding-bottom: 3rem;
  background-color: #096;
}

.categoryimg {
    display:block;
    height:487px;
    max-width:100%;

}

.categorytext1 {
padding: 0 15px;
padding-top:12%;
font-family: Avenir;
color:#0670EB;
font-weight:bold;
background-color:white;
height:487px;
float:left;
}
</style>

语言

Nibook是一个平台,外国人可以通过制作精美的服务将其帧时间转换为金钱,并与当地人亲自或在线分享

语言

Nibook是一个平台,外国人可以通过制作精美的服务将其帧时间转换为金钱,并与当地人亲自或在线分享

身体{ 背景:#f5; } .pad0{ 填充物:5px; 边缘底部:5px; } .类别{ 垫面:3rem; 垫底:3rem; 背景色:#096; } .类别{ 显示:块; 高度:487px; 最大宽度:100%; } .categorytext1{ 填充:0 15px; 垫面:12%; 字体系列:Avenir; 颜色:#0670EB; 字体大小:粗体; 背景色:白色; 高度:487px; 浮动:左; }
我删除了.categorytext和.categorytext中的宽度,但没有任何更改
容器
类上有任何样式吗?我删除了.categorytext和.categorytext中的宽度,但没有任何更改
容器
类上有任何样式吗?