2017-05-14 50 views
0

我在設置jQuery Mobile複選框Controlgroup時遇到了問題。在下面,您可以看到複選框的預期方式以及當前在我的應用程序中的方式。顯然,我的Controlgroup的內部空間大於預期,並且我沒有更改CSS的任何填充或邊距屬性。jQuery Mobile複選框controlgroup spacing

Fiddle

Image

頁面的HTML代碼是:

<form> 
    <fieldset class="ui-field-contain" data-role="controlgroup" data-iconpos="right"> 
        <legend>Swatch B:</legend> 
        <input type="checkbox" name="checkbox-t-2a" id="checkbox-t-2a" data-theme="a"> 
        <label for="checkbox-t-2a">One</label> 
        <input type="checkbox" name="checkbox-t-2b" id="checkbox-t-2b" data-theme="a"> 
        <label for="checkbox-t-2b">Two</label> 
        <input type="checkbox" name="checkbox-t-2c" id="checkbox-t-2c" data-theme="a"> 
        <label for="checkbox-t-2c">Three</label> 
    </fieldset> 
</form> 
+0

JS小提琴鏈接? – Varun

+0

https://jsfiddle.net/gh5t7fam/ @Varun –

+1

你是否從某處複製粘貼的代碼?因爲有太多' '從哪兒冒出來! – Varun

回答

1

點擊你的小提琴的 「整潔」 按鈕,它會調整。

正確對齊按鈕「Confirmar」剛纔設置的空標籤,並刪除ui-btn-inline類(無需額外這裏內聯樣式):

<div class="ui-field-contain"> 
    <label for="btnConfirmar"></label> 
    <a id="btnConfirmar" href="#popupLogin" data-rel="popup" data-position-to="window" class="ui-btn ui-corner-all ui-shadow ui-icon-check ui-btn-icon-left ui-btn-a" data-transition="pop">Confirmar</a> 
</div>