jquery-mobile:如何制作html

时间:2013-12-24 03:07:02

标签: html css jquery-mobile

我几乎尝试了一切, 我想要两个按钮 并排地并排:

<input type="button" value="This week's Schedule" onclick= 'window.location.href = dic[current_sunday]' /> 
<input type="button" value="Next week's Schedule" onclick= 'window.location.href = dic[next_sunday]' />

含义一个按钮占50%,另一个是另外50% 所以它看起来像这样:

{---------------------------------------}{--------------------------------------}

我需要一种适用于 jquery mobile 的方法,我找到了适用于普通格式的方法,但我找不到适用于jquery mobile和<input type"button"

的方法

此:

<style>
.ui-block-a { width: 70% !important; }
.ui-block-b { width: 20% !important; }
</style>
<div class=ui-grid-a>
  <input type="button" value="This week's Schedule" onclick= 'window.location.href = dic[current_sunday]' /> 
  <input type="button" value="Next week's Schedule" onclick= 'window.location.href = dic[next_sunday]' />
</div>

不适用于<input type="button",但适用于<button type="button">eat</button>

像这样使用data-inline="true"

<input type="button" data-inline="true" value="This week's Schedule" onclick= 'window.location.href = dic[current_sunday]' /> 
<input type="button" data-inline="true" value="Next week's Schedule" onclick= 'window.location.href = dic[next_sunday]' />

将按钮并排放置,但它们不是屏幕的50%,按钮的大小足以容纳价值。

RECAP:Away将两个按钮并排显示,每个屏幕的50%,用jquery mobile和<input type="button"

感谢

1 个答案:

答案 0 :(得分:0)

RECAP:Away将两个按钮并排放置,每个屏幕占50%,在jquery mobile和