针对bootstrap内联单选框input与文字不能居中对齐的解决办法
1.html代码
<div >
<label class="checkbox-inline first-label">
<input type="radio" name="getOption" id="option1" value="option1" checked>张三
</label>
<label class="checkbox-inline">
<input type="radio" name="getOption" id="option2" value="option2"> 李四
</label>
<label class="checkbox-inline">
<input type="radio" name="getOption" id="option3" value="option3"> 王五
</label>
</div>
2.css代码
.checkbox-inline{
padding:;
margin:0 15px 0 0;
line-height: 20px;
min-height: 20px;
}
input[type='checkbox'], input[type='radio'] {
margin: -2px 5px 0 0;
line-height: 20px;
}
3.css内的只可根据需要相应调整,本文针对label行高20px举例。
针对bootstrap内联单选框input与文字不能居中对齐的解决办法的更多相关文章
- html 复选框(checkbox)和单选框(radio)与文字水平垂直居中对齐
对 input与label同时设置CSS input,label{ vertical-align:middle; }
- npm install 报错 error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,"d' 解决办法
npm install 报错 : error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,& ...
- Bootstrap内联表单
有时候我们需要将表单的控件都在一行内显示,就需要将表单控件设置成内联块元素(display:inline-block). 在Bootstrap框架中实现这样的表单效果是轻而易举的,你只需要在<f ...
- 单选框input:radio
单选框 CreateTime--2017年5月15日11:40:04 Author:Marydon 四.单选框 (一)语法 <input type="radio"/> ...
- form中 单选框 input[type="radio"] 分组
在form中有时候需要给单选框分组,这种情况下 可以通过给单选框设置相同的name来进行分组: <html> <head> <title> </title&g ...
- bootstrap日期控件在火狐下的模态框中选择时间下拉菜单无效的解决办法
今天收到程序组提交的一个兼容BUG,在火狐中使用模态框加载日期控件时选择时间下拉菜单没有效果(不能点击),而在谷歌中却是好的, 排错思路:1,在当前页面主层放置一个时间控件,测试通过 2,在ajax加 ...
- IE7下,input元素相对父级元素错位解决办法
原因: 当input仅仅包含父元素,父元素拥有margin属性时,IE7的input就会错误的继承margin属性. 解决办法: 给input元素外面套一个span,label这样的内联元素,这样就会 ...
- bootstrap: 内联表单;
<form class="form-inline"> <div class="form-group"> <label for=&q ...
- 修改HTML5 input placeholder 颜色及修改失效的解决办法
input::input-placeholder{color: #bdbdbd ;} /* 有些资料显示需要写,有些显示不需要,但是在编辑器webstorm中该属性不被识别 */ ::-webkit- ...
随机推荐
- AD域修改组策略
如果我们的计算机加入AD域之后,修改安全策略时不能用本地策略来修改.具体修改方法: .Start(开始)–Programs(程序)–Administrative Tools(管理工具)–Group P ...
- 08void
void void修饰函数返回值和参数 如果函数没有返回值,那么应给将其声明为void 如果函数没有参数,应该声明其参数为void 不存在void类型的变量 void指针的意义 C语言规定只有相同类型 ...
- 微信开发-ACCESS TOKEN 过期失效解决方案
微信开发-ACCESS TOKEN 过期失效解决方案 起因:因为access_token的重要性,开发过微信的都知道,但是他有自己的生命周期,官方解释为:"有效期为7200秒",一 ...
- Python基础(二)之字符串
字符串在python语言中极为常用,下面就带大家来一起回顾一下字符串常用的方法: 1.count 作用:统计字符串中字符的个数 例: str_yu = 'xiAoyuhaha' print(str_y ...
- CentOS配置SVN服务器
系统环境:CentOS系统:CentOS 6.5 1.检查是否安装了低版本的SVN rpm -qa subversion 2.卸载旧版本SVN yum remove subversion 3.安装SV ...
- sqlalchemy
#!/usr/bin/env python #coding:utf8 from sqlalchemy import create_engine,and_,or_,func,Table from sql ...
- 【转】apache DateFormatUtils 与 DateUtils 的使用
在Apache Commons项目的Lang里面,有两个类:DateUtils和DateFormatUtils,专门用于处理时间日期转换.它们在 org.apache.commons.lang.tim ...
- dialogfield
before ax2012: typeof() or extendedtype ax2012: extendedtypestr()
- Runtime的几个小例子(含Demo)
一.什么是runtime(也就是所谓的“运行时”,因为是在运行时实现的.) 1.runtime是一套底层的c语言API(包括很多强大实用的c语言类型,c语言函数); [runti ...
- PCI Express(六) - Simple transactions
原文地址:http://www.fpga4fun.com/PCI-Express6.html Let's try to control LEDs from the PCI Express bus. X ...