0

什么是代码问题?请在jsfiddle中查看。
1. 内联帮助不显示在中间。
2.当我滚动窗口时,内联帮助边距不正确。

http://i.stack.imgur.com/8oCG5.jpg

        <form class="well  ">
        <div class="controls controls-row ">
            <input type="text" placeholder="Name" class="span5 ">
            <span class="help-inline">Please Enter Small Name.</span>
        </div>
        <div class="controls controls-row">
            <input type="text" placeholder=".span5" class="span5">
        </div>
        <div class="controls controls-row">
            <input type="text" placeholder=".span4" class="span4">
            <input type="text" placeholder=".span1" class="span1">
        </div>
        <div class="controls controls-row">
            <input type="text" placeholder=".span3" class="span3">
            <input type="text" placeholder=".span2" class="span2">
        </div>
        <div class="controls controls-row">
            <input type="text" placeholder=".span2" class="span2">
            <input type="text" placeholder=".span3" class="span3">
        </div>
        <div class="controls controls-row">
            <input type="text" placeholder=".span1" class="span1">
            <input type="text" placeholder=".span4" class="span4">
        </div>
    </form>
4

2 回答 2

1
              <form class="well  ">
                    <div class="controls controls-row ">
                      <input type="text" placeholder=".spanName">
                      <span class="help-inline">Inline help text</span>
                    </div>
                    <div class="controls controls-row">
                        <input type="text" placeholder=".span5" class="span5">
                    </div>
                    <div class="controls controls-row">
                        <input type="text" placeholder=".span4" class="span4">
                        <input type="text" placeholder=".span1" class="span1">
                    </div>
                    <div class="controls controls-row">
                        <input type="text" placeholder=".span3" class="span3">
                        <input type="text" placeholder=".span2" class="span2">
                    </div>
                    <div class="controls controls-row">
                        <input type="text" placeholder=".span2" class="span2">
                        <input type="text" placeholder=".span3" class="span3">
                    </div>
                    <div class="controls controls-row">
                        <input type="text" placeholder=".span1" class="span1">
                        <input type="text" placeholder=".span4" class="span4">
                    </div>
                </form>

您在输入中使用了一个类(class="span5" 太大而无法获得内联帮助,所以我建议您为内联帮助工作设置常规大小。我认为这就是您想要的

于 2013-01-20T16:36:17.690 回答
1

该类仅在附加了类的表单和您的表单丢失的容器.help-inline的上下文中才能正常工作。您可以通过将块自己与一些负边距对齐或正确设置表单以使用该类以及适当的容器来克服这个问题。.form-horizontal.control-group.help-inline.form-horizontal.control-group

于 2013-01-21T02:24:41.323 回答