jquery mobile

控件组合的水平布局

select + input 在同一行

注意jquery mobile 的js 和css 的版本,

一些低版本 估计不支持

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css" />
    <script  type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
    <script  type="text/javascript" src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script>
<style id="textinput-controlgroup">
            .controlgroup-textinput{
                padding-top:.22em;
                padding-bottom:.22em;
            }
        </style>
</head>
<body>

<div data-role="page">
  <div data-role="header">
    <h1>Welcome To My Homepage</h1>
  </div>

  <div data-role="content">
    <label>title</label>
 

<div data-role="controlgroup" data-type="horizontal">
    <select>
        <option>1</option>
    </select>
    <input id="currency-controlgroup" 
type="text" data-wrapper-class="controlgroup-textinput ui-btn">

</div>

  </div>

  <div data-role="footer">
    <h1>Footer Text</h1>

  </div>
</div> 

</body>
</html>
原文地址:https://www.cnblogs.com/freeliver54/p/3530789.html