码迷,mamicode.com
首页 > 其他好文 > 详细

复选框单选框与文字对齐问题的研究与解决

时间:2017-12-04 13:20:45      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:解决   研究   bottom   type   谷歌浏览器   cal   探讨   strong   没有   

对于14像素大小的字体是没有本篇所要探讨的单(复)选框与文字对齐的问题的。

对于12像素大小的文字,则就存在对齐问题了,尤其在Firefox火狐浏览器以及chrome谷歌浏览器下。

HTML:

    <label style="font-size:12px;">
      <input type="checkbox"/> 文字文字
    </label>

解决方案:

      vertical-align为基础:

      给 input:     vertical-align:text-bottom; margin-bottom:2px; margin-bottom:-2px\9;

      给 input : height:13px; vertical-align:text-top; margin-top:0;

      给 input :height:15px; vertical-align:bottom; margin-bottom:3px; margin-top:-1px;

      给 input :  height:14px; vertical-align:top;

      给 input: vertical-align:middle; margin-top:-2px; margin-bottom:1px;

 

 

      

 

复选框单选框与文字对齐问题的研究与解决

标签:解决   研究   bottom   type   谷歌浏览器   cal   探讨   strong   没有   

原文地址:http://www.cnblogs.com/yangqi1209-com/p/7976335.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!