해당 게시글은 개인 프로젝트인 "데이트 장소 다이어리 제작" 중
#30 "평점 기능 구현" 이슈를 다루고 있습니다.
<li class="list-group-item" id="place-star">
<div>
<h6 class="my-0">평점</h6>
<fieldset>
<input type="radio" name="score" value=5 id="rate1"><label for="rate1">★</label></input>
<input type="radio" name="score" value=4 id="rate2"><label for="rate2">★</label></input>
<input type="radio" name="score" value=3 id="rate3"><label for="rate3">★</label></input>
<input type="radio" name="score" value=2 id="rate4"><label for="rate4">★</label></input>
<input type="radio" name="score" value=1 id="rate5"><label for="rate5">★</label></input>
</fieldset>
</div>
#place-star fieldset{
display: inline-block;
direction: rtl;
border:0;
}
#place-star fieldset legend{
text-align: right;
}
#place-star input[type=radio]{
display: none;
}
#place-star label{
font-size: 2em;
color: transparent;
text-shadow: 0 0 0 #f0f0f0;
}
#place-star label:hover{
text-shadow: 0 0 0 rgba(250, 208, 0, 0.99);
}
#place-star label:hover ~ label{
text-shadow: 0 0 0 rgba(250, 208, 0, 0.99);
}
#place-star input[type=radio]:checked ~ label{
text-shadow: 0 0 0 rgba(250, 208, 0, 0.99);
}