그때 그때/CSS

input date placeholder 없애기, value색 변경

web_seul 2021. 7. 22. 17:24
input[type=date]::-webkit-datetime-edit-text { 
  -webkit-appearance: none; 
  display: none; 
} 

input[type=date]::-webkit-datetime-edit-month-field{ 
  -webkit-appearance: none; 
  display: none; 
} 

input[type=date]::-webkit-datetime-edit-day-field {
  -webkit-appearance: none; 
  display: none; 
} 

input[type=date]::-webkit-datetime-edit-year-field { 
  -webkit-appearance: none; 
  display: none; 
}

 

value값 custom

input[type="date"]:valid{color:#c9c9c9;}

 

indicator custom

input[type="date"]{
    position: relative;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    z-index: 1;
}
input[type="date"]::after{
    content:'';
    width: rem(18);
    height: rem(18);
    position: absolute;
    top: 50%;
    right: rem(16);
    transform: translateY(-50%);
    background: url(../img/icoCal.png) no-repeat;
}

 

 

https://baegofda.tistory.com/106

반응형

'그때 그때 > CSS' 카테고리의 다른 글

드래그 색상 변경  (0) 2022.01.10
ie rowspan border 안보일때  (0) 2021.11.19
selectbox option custom / arrow 제거(ie)  (0) 2021.07.13
border gradient  (0) 2021.02.10
text-decoration / MDN  (0) 2021.01.27