Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
bootstrap 3有没有办法解决以下问题:
我有一个 .nav-tab 导航,它应该显示为堆叠的选项卡(.nav-stacked; 垂直),但仅限于台式机/大型平板电脑。在较小的设备(<768px)上,我想要一个普通的 .nav-tab(水平)。
有没有办法只用几行 CSS 来做到这一点?
使用CSS 媒体查询。
例如,
以下媒体查询中定义的规则将适用于 768 像素以下的任何分辨率
@media (max-width: 768px) { //define your selectors here }