所以,我已经用AMP HTML编写了一个页面,当有人在移动设备上查看页面时,我想隐藏一个DIV,但是我希望它显示在桌面或平板电脑等分辨率上.我启用了Bootstrap,并且根据AMP标准,所有CSS都在文档中设置样式.
<section class="about" id="about" alt="about">
<div class="col-md-6">
<p>Example Content</p>
</div>
<div class="col-md-6">
<amp-img src="example.jpg" alt="Example" height="400" width="800"></amp-img>
</div>
</section>
Run Code Online (Sandbox Code Playgroud)
我希望该部分中的第二个DIV隐藏在Mobile上.
Bootstrap有这类东西的类.单独使用或组合使用可获得所需效果.
hidden-xs
http://getbootstrap.com/css/#responsive-utilities-classes