2

我对 Bootstrapwell超出其包含元素(这里是 a class="row",它本身在 a 中class="span4")有问题。

在我在这里做的 JSFidle 中清晰可见:http: //jsfiddle.net/sebastien_worms/fc42w/2/
和全屏:http: //jsfiddle.net/sebastien_worms/fc42w/2/embedded/result/

代码摘录在这里:

<div class="span4 pull-right">
    <div class="row">
        <div class="well" style="width:100%;">
            <b>This is the well that bothers me !</b><br> It goes beyond the right end of the screen ... And if you click "inspect element", you can see it goes beyond the right-end of its containing "span4" and "row"...
        </div>
    </div>
</div>

当您使用浏览器的窗口大小(大约 1000 像素宽是最明显的)时,您可以看到超出其包含元素(和屏幕)的井。

...显然,我不能将其设置welldiv: http span: //jsfiddle.net/sebastien_worms/fc42w/3/

我应该怎么做才能well填充 100%(仅)span4

4

1 回答 1

16

这是因为你的填充,只需添加这个

.well {
    box-sizing: border-box;
}
  • 它适用于任何现代浏览器和 IE8 及更高版本
于 2012-10-19T16:03:31.007 回答