bootstrap怎么在图形上显示文字
时间: 2024-03-14 18:43:52 浏览: 18
如果你想在bootstrap图形上显示文字,可以使用Bootstrap中的文本组件类。文本组件类用于设置文本的颜色、大小、对齐方式等样式。以下是一些使用文本组件类的示例:
1. 使用`<p>`标签显示文本:
```html
<div class="jumbotron">
<h1>Hello, world!</h1>
<p>This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.</p>
</div>
```
2. 使用`<h1>`-`<h6>`标签显示标题:
```html
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Panel title</h3>
</div>
<div class="panel-body">
Panel content
</div>
</div>
```
3. 使用`<blockquote>`标签显示引用:
```html
<blockquote>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.</p>
<footer>Someone famous in <cite title="Source Title">Source Title</cite></footer>
</blockquote>
```
以上这些示例仅仅是Bootstrap文本组件类的几个例子,更多的使用方法可以参考Bootstrap文档。