CSS改變 Radio Label 的樣式

CSS部分
.rt input[type="radio"] {
display: none;
}

.rt label {
display: inline-block;
background-color: #ddd;
padding: 4px 11px;
font-family: Arial;
font-size: 16px;
cursor: pointer;
}

.rt input[type="radio"]:checked+label {
background-color: #bbb;
}



HTML部分
<div class="rt">
<input name="a1" id="aa" type="radio" value="蘋果" checked>
<label for="aa">蘋果</label>
<input name="a1" id="bb" type="radio" value="香蕉" >
<label for="bb">香蕉</label>
<input name="a1" id="cc" type="radio" value="芒果" >
<label for="cc">芒果</label>
</div>
已邀請:

要回復主題請先登入註冊