【问题标题】:twitter bootstrap border titletwitter bootstrap 边框标题
【发布时间】:2013-08-14 19:54:16
【问题描述】:

只是想知道如何使用引导程序给边框标题?就像下面的例子。

 <div id="form" style="width:350px;">
<fieldset>
    <legend style="color:blue;font-weight:bold;">General Information</legend>
    <table>
    <tr>
    <td><span style="text-decoration:underline">C</span>hange Password To:</td>
    <td><input type="text" /></td>
    </tr>

    <tr>
    <td><span style="text-decoration:underline">C</span>onfirm Password:</td>
    <td><input type="text" /></td>
    </tr>
    </table>
   </fieldset>
</div>

【问题讨论】:

  • 边框标题是什么意思?
  • 你的意思是“给标题一个边框”吗?我不认为这个问题是引导程序独有的,我猜它与某些浏览器以表单形式提供给 的内置样式有关。
  • 好吧,我不知道,是的..想在 chrome 中添加那个图例。

标签: twitter-bootstrap


【解决方案1】:

在引导程序中,有一些用于“破坏”字段集和图例的默认 css,这是查看默认值的答案。 Use Fieldset Legend with bootstrap

【讨论】:

    【解决方案2】:

    根据您的 html,这是 chrome 中的结果:

    您可以简单地控制字段集的边框:

    fieldset{
       border:1px solid #cccc;
    }
    

    但请注意,图例“一般信息”的位置是一种计算样式,但它可以被覆盖。

    Fieldsets and Legends

    【讨论】:

      【解决方案3】:

      要继承引导 css 属性,只需使用表上的引导 css 类。您可能想使用:

      .table-striped 或 .table-bordered 在您的表格标签内。例如表 class="table-bordered"

      【讨论】:

        猜你喜欢
        • 2012-02-06
        • 2012-12-23
        • 2012-09-04
        • 1970-01-01
        • 2013-07-01
        • 1970-01-01
        • 1970-01-01
        • 2012-07-03
        相关资源
        最近更新 更多