使用边距创建带边框的bootstrap cols

时间:2016-09-26 11:16:14

标签: html css twitter-bootstrap

如何使用带边距的bootstrap边界列?

我有:

<div class="col-sm-12 col-lg-6">
  <div class="drag-block" id="addressField_1" ondragover="return dragOver(event)" draggable="true" ondragend="return dragEnd(event)" ondragstart="return dragStart(event)">
  .....................
  </div>
</div>

JSFiddle

但我想要

<div class="col-sm-12 col-lg-6 drag-block" id="addressField_1" ondragover="return dragOver(event)" draggable="true" ondragend="return dragEnd(event)" ondragstart="return dragStart(event)">
.....................
</div>

JSFiddle

并且看起来像第一个。

1 个答案:

答案 0 :(得分:0)

只需将css更改为以下内容:

.drag-block{
    border: 2px dashed #bbb7b7;
    margin: 0px 15px 30px 15px;
    padding: 10px 15px 15px 15px;
    cursor: move;
}