div 内的文字换行

Word wrapping text inside div

如何在 div

中创建跨度 word-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>

我需要一个 css 规则,能够在 div.choice

中打断长文本

在 css

中尝试以下操作
div.choice {
  white-space:normal !important;
  word-wrap: break-word;
}