<div class="mobile"></div>
<div class="desktop"></div>
我想在使用bootstrap的移动和桌面设备中分别显示这些div项目。我想要这样的东西:
<div class="mobile show-on-mobile">This item is not shown in desktop devices.</div>
<div class="desktop show-on-desktop">This item is not shown in mobile devices.</div>
答案 0 :(得分:5)
你可以这样做:
<div class="mobile visible-xs visible-sm">This item is not shown in desktop devices.</div>
<div class="desktop hidden-xs hidden-sm">This item is not shown in mobile devices.</div>
检查此网址以获取更多信息。 http://getbootstrap.com/css/