简体   繁体   English

Twitter Bootstrap的响应式设计

[英]Twitter Bootstrap's responsive design

On my phone, the text in my hero unit here doesn't fit well. 在我的手机上, 此处英雄单元中的文字不太适合。 I want it to wrap or shrink or something. 我希望它能包裹或收缩。 Any suggestions with details on implementation? 关于实施细节有什么建议吗? Thanks. 谢谢。

If you want to shrink it, one option would be to redefine the H1 size and possibly the hero padding for small screens. 如果要缩小它,一种选择是重新定义H1大小,并可能为小屏幕重新定义英雄填充。 By default both are 60px, so you could use media queries with something like 默认情况下两者均为60px,因此您可以将媒体查询与类似

@media (max-width: 767px){

.hero-unit h1 {
font-size: 40px;
}

.hero{
padding:40px;
}

} 

You might need to play with the padding, the font size and the viewport max-width to get the results you want, but this should get you started. 您可能需要使用填充,字体大小和视口最大宽度来获得所需的结果,但这应该可以帮助您开始。

Good luck 祝好运

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM