如何在最新版本的bootstrap中禁用手机/平板电脑视图?

时间:2018-02-09 18:23:19

标签: javascript html css twitter-bootstrap mobile

如何在最新版本的bootstrap中禁用手机/平板电脑视图?

我能找到的所有答案都适用于现在似乎不起作用的旧版bootstrap。

1 个答案:

答案 0 :(得分:0)

enter image description here

.visible-lg {
  @media (max-width: @screen-phone-max) {
    .responsive-invisibility();
  }
  &.visible-xs {
    @media (max-width: @screen-phone-max) {
      .responsive-visibility();
    }    
  }
  @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
    .responsive-invisibility();
  }
  &.visible-sm {
    @media (min-width: @screen-tablet) and (max-width: @screen-tablet-max) {
      .responsive-visibility();
    }    
  }
  @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
    .responsive-invisibility();
  }
  &.visible-md {
    @media (min-width: @screen-desktop) and (max-width: @screen-desktop-max) {
      .responsive-visibility();
    }    
  }
  @media (min-width: @screen-large-desktop) {
    .responsive-visibility();
  }
}