나는 스타일 radion 버튼에이 방법을 원하는 :다른 색상
내가 지금 다음과 같습니다 한 코드 :
input[type=radio] {
display:none;
}
input[type=radio]:checked +label:before {
background:green;
width: 15px;
height: 15px;
border: 0;
border-radius: 50%;
}
label {
color:black;
font-family:arial;
font-size:12px;
position:relative;
padding-left:20px;
}
label:hover {
color:green;
}
label:hover:before {
border:1px solid green;
border-radius: 50%;
}
label:before {
content:'';
height:13px;
width:13px;
border:1px solid lightgray;
border-radius: 50%;
display:inline-block;
position:absolute;
top:0;
left:0;
}
와 HTML 코드 :
<input id="kunstmuseum1" type="radio" name="kunstmuseum" onClick="animateKunst('voll')"> <label class="gruen" for="kunstmuseum1">Volle Subvention</label>
<input id="kunstmuseum2" type="radio" name="kunstmuseum" onClick="animateKunst('halb')"><label for="kunstmuseum2">Subventionen um die Hälfte kürzen</label>
<input id="kunstmuseum3" type="radio" name="kunstmuseum" checked="checked" onClick="animateKunst('null')"><label for="kunstmuseum3">Keine Subventionen mehr</label>
input [type = radio]에 다른 클래스를 추가 할 수 있습니까? 반만 라디오 버튼을 채우시겠습니까? 여기 jsfiddle입니다 : http://jsfiddle.net/x5d4tyq7/이
라디오 버튼을 반으로 채우면 여전히 선택 가능합니까? –
예, 비주얼뿐입니다. 물론 비주얼에 대해서는 확실하지 않지만, 버튼 사이에도 차이가 있습니다. 내가 알지 못하는 것은 개별적으로 라디오 버튼에 다른 스타일을 설정하는 방법입니다. 예 : 동일한 라디오 단추 그룹이지만 녹색, 주황색 및 빨간색 중 하나입니다. – Felix