简体   繁体   English

使用引导程序在移动视图中隐藏/显示div

[英]Hiding/showing divs in mobile view using bootstrap

I am building a page where I have to panes (left/right). 我正在建立一个必须在其中窗格(左/右)的页面。 Left pane will show the list of items and right pane will show the detail of selected item from left pane. 左窗格将显示项目列表,右窗格将显示从左窗格中选择的项目的详细信息。 However, when same page being displayed in Mobile it should show only List of item first. 但是,当同一页面在Mobile中显示时,它应该仅显示项目列表第一。 When selected any item in the list, than list pane should be hidden and detail pane should be showing. 当选择列表中的任何项目时,列表窗格应该被隐藏,并且详细信息窗格应该被显示。 Detail pane will have a back button, which show the Left(list pane) and hide the detail pane. 详细信息窗格将具有一个后退按钮,该按钮显示左(列表窗格)并隐藏详细信息窗格。

Question: How can I achieve this scenario in twitter bootstrap? 问题:如何在Twitter Bootstrap中实现此方案?

好的,这样一来,您可以使用.hidden-md hidden-lg最初隐藏右侧面板,但是之后,您需要启用内容并使用JS .toggle()或直接使用.removeClass("...").addClass("...")

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM