简体   繁体   中英

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. By default both are 60px, so you could use media queries with something like

@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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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