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