您的位置:首页 > Web前端 > BootStrap

laydate兼容bootstrap

2015-09-08 10:38 519 查看

laydate兼容bootstrap

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

蕃薯耀 2015年9月8日 10:33:43 星期二
http://fanshuyao.iteye.com/
在使用Bootstrap后,再使用laydate,框会偏移一点,原因是Bootstrap使用了 * {box-sizing:border-box;}

来reset浏览器的默认盒子模型。所以加上以下样式就能兼容Bootstrap了

.laydate_box, .laydate_box * {
box-sizing:content-box;
}


另外,由于input的样式不一样,导致输入框大小不一致,可以加上下面的样式兼容:

input.laydate-icon,div.laydate-icon{
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}
div.laydate-icon{
text-align: left;
}


>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

蕃薯耀 2015年9月8日 10:33:43 星期二
http://fanshuyao.iteye.com/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: