包裹在div里面的词文本

时间:2015-01-16 04:29:14

标签: css twitter-bootstrap-3

如何在div中包含字词包装

not wrapped

代码:

<div class="col-xs-6 choice btn btn-default" >
  <span class="pull-left">(Kepala) Bagian Purchasing (tidak ada di SK? aslinya under WR2) [Purchasing]</span> <!-- this one needs to be wrapped -->
  <span class="pull-right">
    <span class="label label-primary" title="total">1</span>
  </span>
</div>

我需要一个能够在div.choice

内打破长文本的css规则

1 个答案:

答案 0 :(得分:1)

在你的css中尝试以下内容

div.choice {
  white-space:normal !important;
  word-wrap: break-word;
}