All geek questions in one place

Typography and font size Bootstrap does not change

<BODY>
<nav class="navbar navbar-default">
<div class="container-fluid">
    <div class="navbar-header col-xs-3 col-md-3">
        <a class="navbar-brand" href="#">My Brand</a>
    </div>
    <div class="col-xs-9 col-md-9">
        <ul class="nav navbar-nav navbar-right">
            <li><a href="#">Home</a></li>
            <li><a href="#">About</a></li>
            <li><a href="#">Contact</a></li>
        </ul>
    </div>
</div>
</nav>
</BODY>

This is a navigation bar, and I wrote plain text. I expected the font size to change as the resolution changed. But the font size always remains the same. How can I change the font size automatically when changing the resolution or screen size?

+2
twitter-bootstrap resize font-size typography
Jay Jul 12 '14 at 4:47
source share
1 answer

Here is one way to use media queries: http://codepen.io/panchroma/pen/stBnj

- . , , . , , - , .

, http://fittextjs.com, , .

!

CSS

@media (max-width: 480px) {
    .navbar li a{
    font-size:14px;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .navbar li a{
    font-size:20px;
    }
}

@media (min-width: 768px) and (max-width: 979px) {
    .navbar li a{
    font-size:26px;
    }
}

@media (min-width: 980px) {
  .navbar li a{
  font-size:30px;
  }
}
+8
David Taiaroa 12 . '14 10:48

Source: https://habr.com/ru/post/1548047/

More articles:

  • Umbraco foreach kids with children page - c #
  • Error using sendKeys () with Selenium WebDriver Java.lang.CharSequence could not be resolved - java
  • Error with selenium.WebElement.sendKeys () - java
  • Django Many to Many and admin - python
  • Размер загрузочного образа для небольшого экрана, не работает - image
  • Backup Space for ScrollViewer - c #
  • How to combine lines? - sql
  • Perl grepping related words - perl
  • SSH connection is screwed after establishing a VPN connection - linux
  • "нет основного атрибута манифеста" при попытке выполнить жирную банку - spring-boot

All Articles

Geek Questions | 2019