<li>
<p>싱글</p>
<input id="B1" type="radio" name="bed" value="single_bed" required/>
<label for="B1" id="single"></label>
</li>
label에 id값을 넣어주고
#single{
content:url("../../images/lodgingList_images/single_bed.png");
width:50px;
}
css로 이미지 넣은다음에 크기조절
[type=radio] {
position: absolute;
display:none;}
라디오 버튼의 동그라미 none하는 코드
[type=radio] + label {
cursor: pointer;}
커서포인터 변경
input[type=radio]:checked + label{
border-bottom: 5px solid indigo;}
체크했을때 그 부분 강조
근데 이렇게 하면 required 가 안먹히는 현상이 발생한다
display:none이 문제였는데..
border:none도 해보고
border:0도 해보고 다 안됨 ㅠㅠ
우선은 width:1px로 작은 점을 만들었음
'front' 카테고리의 다른 글
append로 추가한후 remove로 지우기 (0) | 2022.12.23 |
---|---|
append로 이미지 등록 할 때 하나씩만 뜨게 하기 (0) | 2022.12.22 |
영역 선택시 밑에 다른 영역 띄우기 (0) | 2022.10.26 |
click시 텍스트 경고창, 새로운 div추가 (0) | 2022.10.04 |
이벤트 메서드 (0) | 2022.10.04 |