扫码关注官方订阅号
我的html是这样的;我的css是这样的:但是手机上出来的效果,就是type=date的背景没有透明
学习是最好的投资!
.date input[type=date] { background-color:transparent; color:#fff; FILTER: alpha(opacity=0); /*androd*/ appearance:none; /*下拉框去掉右侧图标*/ -moz-appearance:none; -webkit-appearance:none; }
http://blog.csdn.net/mr_smile...
css
input[type="date"]:before{ color:#A9A9A9; content:attr(placeholder); } input[type="date"].full:before { color:black; content:""!important; }
js
$("#date").on("input",function(){ if($(this).val().length>0){ $(this).addClass("full"); }else{ $(this).removeClass("full"); } });
谢邀,用这个。
background-color: transparent;
给你写了个dmeo, background-color 和 background 对于背景颜色的权重,你一看便明白
background-color
background
https://jsfiddle.net/eskmy2gs/
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
http://blog.csdn.net/mr_smile...
css
js
谢邀,用这个。
给你写了个dmeo,
background-color和background对于背景颜色的权重,你一看便明白https://jsfiddle.net/eskmy2gs/