Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 如何创建一个合理的菜单,在移动设备上使用引导堆栈?_Css_Twitter Bootstrap - Fatal编程技术网

Css 如何创建一个合理的菜单,在移动设备上使用引导堆栈?

Css 如何创建一个合理的菜单,在移动设备上使用引导堆栈?,css,twitter-bootstrap,Css,Twitter Bootstrap,我有一个有6个按钮的对齐按钮组 它看起来很棒,但在手机上,我想让它堆叠成一个垂直按钮组,即btn块 有没有一个很酷的方法来实现这一点?我必须同时创建它们,并在不同的大小上隐藏/显示吗?您需要添加自己的响应CSS,这将覆盖Bootstrap的移动视图样式 您需要添加自己的响应CSS,这将覆盖Bootstrap的移动视图样式 这与flexbox有何关系?可能与flexbox有何关系?可能与flexbox有何关系 @media (max-width: 768px) { .btn-group-

我有一个有6个按钮的对齐按钮组

它看起来很棒,但在手机上,我想让它堆叠成一个垂直按钮组,即
btn块


有没有一个很酷的方法来实现这一点?我必须同时创建它们,并在不同的大小上隐藏/显示吗?

您需要添加自己的响应CSS,这将覆盖Bootstrap的移动视图样式


您需要添加自己的响应CSS,这将覆盖Bootstrap的移动视图样式


这与flexbox有何关系?可能与flexbox有何关系?可能与flexbox有何关系
@media (max-width: 768px) {
  .btn-group-justified-responsive > .btn,
  .btn-group-justified-responsive > .btn-group {
    display: block;
    width: auto;
    margin: 0 !important;
  }

  .btn-group-justified-responsive > .btn-group > .btn {
    border-radius: 0;
  }

  .btn-group-justified-responsive > .btn-group:not(:last-child) > .btn {
    border-bottom: none;
  }

  .btn-group-justified-responsive > .btn-group:first-child > .btn:first-child {
    border-top-left-radius: 5px !important;
  }
  .btn-group-justified-responsive > .btn-group:first-child > .btn:last-child {
    border-top-right-radius: 5px !important;
  }
  .btn-group-justified-responsive > .btn-group:last-child > .btn:first-child {
    border-bottom-left-radius: 5px !important;
  }
  .btn-group-justified-responsive > .btn-group:last-child > .btn:last-child {
    border-bottom-right-radius: 5px !important;
  }
}