button字体垂直居中的⽅法
  要让<input type="button" />中的⽂字垂直居中,可有两种办法:
  1:CSS设定样式
  <style type="text/css">
    input.btn_normal{border:1px; background:lightblue; font-size:12px; color:red; padding-bottom:0px; padding-top:3px; cursor:pointer}
  </style>
  <input type="button" class="btn_normal" value="确定" />
  利⽤CSS的padding来使⽂字垂直居中,⾸先padding-bottom设置位0,⽽padding-top则根据实际情况进⾏设置,肯定会有⼀个恰当的值会使得⽂字恰好
垂直居中。
  2:插⼊背景图⽚
css设置文字垂直居中  相⽐于上⾯的⽅法,本⽅法更为常⽤:先设计好背景图⽚,包含按钮中要显⽰的⽂字,然后将其设置为按钮的背景图⽚即可。
  <input type="button" value="确定" />

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。