Bootstrap - Adding legend to well

后端 未结 2 967
既然无缘
既然无缘 2021-02-05 08:23

I am currently using twitter bootstrap, which is working nicely, but I would like to add a legend to the \"well\" elements that are used in a form (so that I can have multiple w

2条回答
  •  萌比男神i
    2021-02-05 08:47

    This worked for me in what I was trying to achieve as a groupbox in Bootstrap.

    fieldset {
      min-width: 0;
      padding: 0;
      margin: 0;
      border: 0;
    }
    .well {
      min-height: 20px;
      padding: 19px;
      margin-bottom: 20px;
      background-color: #f5f5f5;
      border: 1px solid #e3e3e3;
      border-radius: 4px;
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
      box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
    }
    .well-legend {
      display: block;
      font-size: 14px;
      width: auto;
      padding: 2px 7px 2px 5px;
      margin-bottom: 20px;
      line-height: inherit;
      color: #333;
      background: #fff;
      border: 1px solid #e3e3e3;
      border-radius: 4px;
      box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
      -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
    }
    Group Box Legend ... your inputs ...

提交回复
热议问题