博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
复选框单选框与文字对齐问题的研究与解决
阅读量:4625 次
发布时间:2019-06-09

本文共 639 字,大约阅读时间需要 2 分钟。

对于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;

 

 

      

 

转载于:https://www.cnblogs.com/yangqi1209-com/p/7976335.html

你可能感兴趣的文章
Eclipse+Maven+springmvc+HelloWorld--Eclipse Maven springMVC第一个HelloWorld吐血配置整理
查看>>
传Windows 8.1系统将重新加入开始按钮
查看>>
C# 自定义异常的方法源码演示及说明
查看>>
输出与输出:putchar() getchar() printf() scanf() puts() gets() sscanf()
查看>>
文档翻译-Minimizing your app's Memory Footprint
查看>>
[Unity优化]批处理01:Statistics窗口
查看>>
自然数的拆分(DFS)
查看>>
nodejs websocket
查看>>
SQLAlchemy_定义(一对一/一对多/多对多)关系
查看>>
添加远程库
查看>>
iOS Animation 学习(3)
查看>>
正则化方法:L1和L2 regularization、数据集扩增、dropout
查看>>
Hadoop学习笔记3---安装并运行Hadoop
查看>>
ASP.NET MVC性能优化(实际项目中)
查看>>
《算法法论学习笔记》-- 数组最大子数组(分治法)
查看>>
汇编语言 第二章
查看>>
Windows Server 2008 R2 配置AD(Active Directory)域控制器
查看>>
整合Spring、SpringMVC、MyBatis
查看>>
JDK1.8之Stream
查看>>
SqlZoo.net习题答案:Using the SELECT statement.【bbc】
查看>>