如何使用 JQuery 移动更改移动方向时使网格元素水平对齐到垂直对齐
How to make grid elements horizontally to vertically aligned when mobile orientation changed with JQuery Mobile?
我有一个简单的JQuery Mobile网页,其中网格有四个块水平对齐。每个块都有一个文本描述和一个按钮。
它在桌面浏览器上显示得很好,而在我的android galaxy手机上显示时,块看起来非常挤压,因为它们仍然是水平对齐的。
如何配置网格或设置网格样式,以便在屏幕从纵向定向到横向时自动垂直对齐块?
<div id="grid1" class="ui-grid-c">
<div class="ui-block-a">
<div class="div-widget" id="divEnterObs">
<h2>Enter Observations</h2>
<span>View and enter observations by map or form.</span>
<a data-ajax="false" href="LocationlistingServlet"
data-role="button" id="btnEnterObs" data-theme="a" data-corners="true" data-shadow="true"
data-inline="false" data-mini="false">
Enter Observations</a>
</div>
</div>
<div class="ui-block-b">
<div class="div-widget" id="divManageUserAccess">
<h2>Manage user access</h2>
<span>Manage and appoint members that can access the app.</span>
<a data-ajax="false" href="manageUserAccess.jsp"
data-role="button" id="btnManageUserAccess" data-theme="a" data-corners="true" data-shadow="true"
data-inline="false" data-mini="false">
Manage User Access</a>
</div>
</div>
<div class="ui-block-c">
<div class="div-widget" id="divManageLocations">
<h2>Manage locations</h2>
<span>Add, update or activate / de-activate locations.</span>
<a data-ajax="false" href="#"
data-role="button" id="btnManageLocations" data-theme="a" data-corners="true" data-shadow="true"
data-inline="false" data-mini="false">
Manage Locations</a>
</div>
</div>
<div class="ui-block-d">
<div class="div-widget" id="divAdminTools">
<h2>Admin Tools</h2>
<span>Execute admin functions.</span>
<a data-ajax="false" href="#"
data-role="button" id="btnAdminTools" data-theme="a" data-corners="true" data-shadow="true"
data-inline="false" data-mini="false">
Admin Tools</a>
</div>
</div>
</div>
通过添加"ui-response"解决了这个问题。
<div id="grid1" class="ui-grid-c ui-responsive">
相关文章:
- jquery移动对齐按钮取决于内容大小
- 如何在JavaScript图像滑块内居中对齐图像
- 为什么文本对齐:对;工作不正常
- 显示可链接的搜索结果+对齐方式
- 以Jquery为中心的Div中的图像对齐
- 无法将文本与图片垂直对齐
- 在这种情况下,如何正确对齐显示
- 使用jquery垂直对齐动态加载的图像
- 如何使 DIV 中的内容垂直对齐
- '填隙'当所述项目不在容器中时,将一些项目与引导程序网格对齐
- 如何使用 JQuery 移动更改移动方向时使网格元素水平对齐到垂直对齐
- 将彩色带置于图像/标签+图像/文本对齐方式之上->JavaScript Titanium移动应用程序
- 文本不会对齐或移动
- 在Angular JS中使用移动视图时,表单元格中不会出现文本对齐
- FlexImages移动设备上对齐的网格图像大小
- 对齐文本与按钮在可折叠集jquery移动
- Jquery移动日期框自定义对齐
- 零宽度行内元素移动对齐的文本节点内容
- 将移动的音频同步条对齐到画布内的圆圈
- jQuery移动范围滑块输入框对齐