css - 使容器流体正确地包含文本

标签 css twitter-bootstrap

我正在制作一个使用 Twitter Bootstrap 的页面。我只想在响应式容器中写入一行。

我试过的是:

<div class="container-fluid">
 <div class="row-fluid">
   <div class="span10" style="background-color:red;
    border-radius:30px;color:powderBlue">
      <p style="font-size: 22px">My sample text here.</p>
    </div>

 </div> 
  </div>

但这不能正常工作,因为我的一些文本超出了红色背景的范围。 有什么帮助吗? 谢谢

最佳答案

从左边留一些填充可能会起作用。

试试这个

<div class="container-fluid">
<div class="row-fluid" >
<div class="span10" style="background-color:red;padding-left:10px;border-radius:30px;color:powderBlue">
    <p style="font-size: 22px">My sample text here.</p>
</div>
</div>
</div>

关于css - 使容器流体正确地包含文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27823716/

相关文章:

html - 列数未知/宽度相同的 CSS 网格布局

css - 如何设置折叠的反向 Bootstrap 导航栏下边框颜色的样式?

html - 如何在 img 之上堆叠图像?

html - 如何将 bootstrap 导航栏调整为 900px 并将其置于页面中心

asp.net-mvc - ASP.NET MVC 验证将类添加到包含 div

css - Bootstrap 3 第二列折叠..第三列向右浮动

css - 高度属性 CSS

css - 将背景颜色设置为透明 CSS

javascript - 水平CSS菜单上的右对齐菜单链接

html - 当屏幕变得可滚动时奇怪的 css 行为