问题
With JQM 1.3 the best practice to change a button's height was :
#containerdivID .ui-btn {
height:20px;
line-height:20px;
}
is it still right for JQM 1.4...I mean the buttons are weird, there is a kind a inner margin around them :
Here's my html :
<div id="expShortButtonsStart">
<button id="ExpShortGotoapp" class="ui-btn-b ui-icon-logo ui-btn-icon-right">Start</button>
</div>
回答1:
In case the button is into a div container, you need to remove the top and bottom padding:
#expShortButtonsStart .ui-btn {
height:20px;
line-height:20px;
padding-top: 0;
padding-bottom: 0;
}
Without div container, the old way works well :
#buttonid.ui-btn {
height:20px;
line-height:20px;
}
来源:https://stackoverflow.com/questions/24068267/change-height-of-buttons-in-jquery-mobile-1-4-best-practices