使用 CSS 和 data-inline="true" 标记的替代示例
CSS
#inline-select-container {
overflow:auto;
}
#inline-select-left {
float:left;
}
#inline-select-right {
float:right;
}
HTML
<div data-role="page" class="type-home">
<div data-role="content">
<div id="inline-select-container">
<div id="inline-select-left">
<select name="select-choice-0" id="select-choice-1" data-inline="true">
<option >Shipping method</option>
<option value="standard">Standard: 7 day</option>
<option value="rush">Rush: 3 days</option>
<option value="express">Express: next day</option>
<option value="overnight">Overnight</option>
</select>
</div>
<div id="inline-select-right">
<select name="select-choice-2" id="select-choice-2" data-inline="true">
<option >Shipping method</option>
<option value="standard">Standard: 7 day</option>
<option value="rush">Rush: 3 days</option>
<option value="express">Express: next day</option>
<option value="overnight">Overnight</option>
</select>
</div>
</div>
<br />
<br />
<div id="inline-select-container">
<div id="inline-select-left">
<label for="select-choice-0" class="select">Shipping method:</label>
<select name="select-choice-0" id="select-choice-1" data-inline="true">
<option value="standard">Standard: 7 day</option>
<option value="rush">Rush: 3 days</option>
<option value="express">Express: next day</option>
<option value="overnight">Overnight</option>
</select>
</div>
<div id="inline-select-right">
<label for="select-choice-2" class="select">Shipping method:</label>
<select name="select-choice-2" id="select-choice-2" data-inline="true">
<option value="standard">Standard: 7 day</option>
<option value="rush">Rush: 3 days</option>
<option value="express">Express: next day</option>
<option value="overnight">Overnight</option>
</select>
</div>
</div>
</div>
</div>