<h1>
我如何在 getboostrap.com 主页上为 Bootstrap 3创建可调整大小的元素: http ://getbootstrap.com/getting-started/
我知道我可以使用 fittext.js 之类的工具,但他们似乎可以通过使用 CSS 媒体查询进行调整。
<h1>
我如何在 getboostrap.com 主页上为 Bootstrap 3创建可调整大小的元素: http ://getbootstrap.com/getting-started/
我知道我可以使用 fittext.js 之类的工具,但他们似乎可以通过使用 CSS 媒体查询进行调整。
从他们的 CSS
@media (min-width: 768px) {
.bs-masthead h1 {
font-size: 100px;
}
}
.bs-masthead h1 {
font-size: 50px;
line-height: 1;
color: #fff;
}
您可以将<h1>
标签放在Jumbotron中。默认 h1 字体大小为 36 像素。您可以使用媒体查询使其更大:
@media screen and (min-width: 768px) {
h1.resizable {
font-size: 63px;
}
}
您可以将resizable
类添加到任何 h1 标记,如果屏幕宽度至少为 768 像素,它将使其更大。