javascript - 移动端怎么让安卓的type=date的input的背景色透明??
本文介绍了javascript - 移动端怎么让安卓的type=date的input的背景色透明??的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
我的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");
}
});
这篇关于javascript - 移动端怎么让安卓的type=date的input的背景色透明??的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文