bootstrap导致chrome中的<input type="date"/>和<input type="datetime-local"/>中的下拉箭头消失...

本文介绍了如何通过CSS代码解决Chrome浏览器25系列版本中Bootstrap框架下日期和时间输入框下拉箭头消失的问题,提供了具体的CSS样式调整方案。

项目中使用了bootstrp,结果发现在Chrome中,类型为<input type="date"/>和<input type="datetime-local"/>中的下拉箭头消失了

查了下资料,据说是chrome的BUG,而且只是chrome 25系列版本的BUG

解决办法,就是加上如下的CSS,说白了,就是调整箭头和上下选择按钮的位置

input::-webkit-inner-spin-button {
display:inline-block;
float:right;
}

input::-webkit-calendar-picker-indicator{
display: inline-block;
float:right;
margin-top:2%;
}

  要精确一点,就加上类型限定

input[type="date"]::-webkit-inner-spin-button {
display:inline-block;
float:right;
}

input[type="date"]::-webkit-calendar-picker-indicator{
display: inline-block;
float:right;
margin-top:2%;
}

  

转载于:https://www.cnblogs.com/varlxj/archive/2013/03/20/chrome_bug_with_bootstrap.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值