Bootstrap v4 - responsive text

2019-03-05 18:03发布

问题:

How to use responsive text in bootstrap v4? I tried:

@include media-breakpoint-up(sm) {
  .resp-text {
    font-size: 16px;
  }
}

@include media-breakpoint-up(lg) {
  .resp-text {
    font-size: 28px;
  }
}

but not working.

回答1:

there could be multiple reasons

  • ensure that you are using SASS with SASS Compiler if not then use normal media queries https://v4-alpha.getbootstrap.com/layout/overview/#responsive-breakpoints
  • if you are using SASS then ensure you have imported the correct mixins file to your core sass file.
  • if you think everything is perfect then compile sass files separately and post screenshot of the error so we can get it perfectly.