Bootstrap 3 fill
时间: 2023-07-25 18:12:01 浏览: 91
Bootstrap 3 provides several classes for filling elements with background color. You can use the "bg-" prefix with the color name to set the background color of an element. For example, if you want to set the background color of an element to blue, you can use the class "bg-blue".
Bootstrap 3 also provides a "bg-fill" class that can be used to fill an element with the background color of its parent element. This can be useful for creating background patterns or gradient effects.
Here's an example of how to use the "bg-fill" class:
```
<div class="container">
<div class="row">
<div class="col-md-6 bg-fill">
This element will be filled with the background color of its parent element.
</div>
<div class="col-md-6 bg-blue">
This element will have a blue background color.
</div>
</div>
</div>
```
In this example, the first element will be filled with the background color of its parent element (the "row" element), while the second element will have a blue background color (because of the "bg-blue" class).
阅读全文