Muk*_*ant 30 html css twitter-bootstrap bootstrap-4
在Bootstrap 4中,font-size默认使用em或rem用于字体.
如何增加font-size所有视口大小?因为每个元素看起来很小.
Jad*_*wan 41
由于引导4使用REM对于font-size大多数它的元素的单元,可以设置font-size在pxHTML元素在您自己的样式表,这将改变默认大小引导适用于您的元素.我已经包含了一个代码项目的链接,因此您可以看到它的实际效果.环境中已经加载了Bootstrap 4.如果更改的值font-size的html选择和运行,你可以看到所有元素的大小如何变化相对于根元素的项目.
在样式表中添加三行CSS应该非常简单:
html {
font-size: 16px;
}
Run Code Online (Sandbox Code Playgroud)
Mr.*_*han 11
您可以使用.h1到.h6自举类也可以使自己的自定义CSS类,并在这里定义字体大小,并把你的班级您的HTML元素。
Bootstrap 4:您可以使用多种类来自定义文本:
h1 —— h6display-1 —— display-4smalllead<!--class="h3" class="display-3", class="small"-->
<div *ngIf="customer_selected" class="h5">
<p>First name: {{selected_customer.first_name}}</p>
<p>Last name: {{selected_customer.last_name}}</p>
</div>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
55959 次 |
| 最近记录: |