先上效果图
html格式
<div>
<input type="month">
</div>
css 部分
input[type="month"]::-webkit-datetime-edit{
line-height: 32px;
}
input[type="month"]::-webkit-clear-button{
display: none;
}
input[type="month"]::-webkit-calendar-picker-indicator{
display: none;
}
input[type="month"]::-webkit-inner-spin-button{
display: none;
}
input[type="month"]::-webkit-clear-button{
display: none;
}
input{
outline: none;
}
.date-mode{
position: absolute;
top: 32px;
left: 0;
font-size: 12px;
width: 210px;
border: 1px solid #999;
background: #fff;
z-index: 10;
display: none;
}
.date-tit{