ElementUi的断点隐藏类 ElementUi框架

  • hidden-xs-only: 当视口在 xs 尺寸时隐藏
  • hidden-sm-only: 当视口在 sm 尺寸时隐藏
  • hidden-sm-and-down: 当视口在 sm 及以下尺寸时隐藏
  • hidden-sm-and-up: 当视口在 sm 及以上尺寸时隐藏
  • hidden-md-only: 当视口在 md 尺寸时隐藏
  • hidden-md-and-down: 当视口在 md 及以下尺寸时隐藏
  • hidden-md-and-up: 当视口在 md 及以上尺寸时隐藏
  • hidden-lg-only: 当视口在 lg 尺寸时隐藏
  • hidden-lg-and-down: 当视口在 lg 及以下尺寸时隐藏
  • hidden-lg-and-up: 当视口在 lg 及以上尺寸时隐藏
  • hidden-xl-only: 当视口在 xl 尺寸时隐藏

说明:

xs < 768px
sm ≥ 768px
md ≥ 992px
lg ≥ 1200px
xl ≥ 1920px

css代码

@media only screen and (max-width:767px) { .hidden-xs-only { display: none!important } } @media only screen and (min-width:768px) { .hidden-sm-and-up { display: none!important } } @media only screen and (min-width:768px) and (max-width:991px) { .hidden-sm-only { display: none!important } } @media only screen and (max-width:991px) { .hidden-sm-and-down { display: none!important } } @media only screen and (min-width:992px) { .hidden-md-and-up { display: none!important } } @media only screen and (min-width:992px) and (max-width:1199px) { .hidden-md-only { display: none!important } } @media only screen and (max-width:1199px) { .hidden-md-and-down { display: none!important } } @media only screen and (min-width:1200px) { .hidden-lg-and-up { display: none!important } } @media only screen and (min-width:1200px) and (max-width:1919px) { .hidden-lg-only { display: none!important } } @media only screen and (max-width:1919px) { .hidden-lg-and-down { display: none!important } } @media only screen and (min-width:1920px) { .hidden-xl-only { display: none!important } }