更改jquery mobile 1.4中按钮的高度,最佳做法 [英] change height of buttons in jquery mobile 1.4, best practices
本文介绍了更改jquery mobile 1.4中按钮的高度,最佳做法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于JQM 1.3,更改按钮高度的最佳实践是:
With JQM 1.3 the best practice to change a button's height was :
#containerdivID .ui-btn {
height:20px;
line-height:20px;
}
JQM 1.4是否正确...我的意思是按钮很奇怪,它们周围有一种内在的边缘:
is it still right for JQM 1.4...I mean the buttons are weird, there is a kind a inner margin around them :
这是我的html:
<div id="expShortButtonsStart">
<button id="ExpShortGotoapp" class="ui-btn-b ui-icon-logo ui-btn-icon-right">Start</button>
</div>
推荐答案
如果按钮位于div容器中,则需要删除顶部和底部填充:
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;
}
没有div容器,旧方法效果很好:
Without div container, the old way works well :
#buttonid.ui-btn {
height:20px;
line-height:20px;
}
这篇关于更改jquery mobile 1.4中按钮的高度,最佳做法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文